mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-27 02:00:28 +01:00
xcb: Handle recording surfaces differently
Let's say we are painting recording surface 'source' to xcb surface 'target' by replaying the source to a temporary surface 'tmp'. Previously, the xcb backend replayed the recording surface to tmp with just a translation and then used that as its source surface with the pattern's transformation. That means 'tmp' used the same coordinate system as 'source'. This patch changes this so that the transformation is applied during the replay and painting from 'tmp' to 'target' is just a simple translation, so 'tmp' now uses the same coordinate system as 'target'. This should produce way less better results, because transforming a recording surface should have less artifacts than transforming a raster surface. Fixes: record1414x-* record2x-* record90-* ps-surface-source Breaks (or rather, "exposes unrelated bug that I have not yet figured out in"): record-extend-*-similar Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
13d61d7bdb
commit
e704f64d8f
1 changed files with 3 additions and 7 deletions
|
|
@ -1084,6 +1084,8 @@ record_to_picture (cairo_surface_t *target,
|
|||
}
|
||||
|
||||
cairo_matrix_init_translate (&matrix, extents->x, extents->y);
|
||||
cairo_matrix_multiply (&matrix, &matrix, &pattern->base.matrix);
|
||||
|
||||
status = _cairo_recording_surface_replay_with_clip (source,
|
||||
&matrix, tmp,
|
||||
NULL);
|
||||
|
|
@ -1095,13 +1097,7 @@ record_to_picture (cairo_surface_t *target,
|
|||
/* Now that we have drawn this to an xcb surface, try again with that */
|
||||
_cairo_pattern_init_static_copy (&tmp_pattern.base, &pattern->base);
|
||||
tmp_pattern.surface = tmp;
|
||||
|
||||
if (extents->x | extents->y) {
|
||||
cairo_matrix_t *pmatrix = &tmp_pattern.base.matrix;
|
||||
|
||||
cairo_matrix_init_translate (&matrix, -extents->x, -extents->y);
|
||||
cairo_matrix_multiply (pmatrix, pmatrix, &matrix);
|
||||
}
|
||||
cairo_matrix_init_translate (&tmp_pattern.base.matrix, -extents->x, -extents->y);
|
||||
|
||||
picture = _copy_to_picture ((cairo_xcb_surface_t *) tmp);
|
||||
if (picture->base.status == CAIRO_STATUS_SUCCESS)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue