image: Correct origin of unbound recording surface source
Clearly demonstrated by using the test-base with the recording surfaces and exemplified by the fallback-resolution with PDF, which is *almost* fixed! We're very close to making a release candidate for 1.12 now... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
@ -703,8 +703,6 @@ _pixman_image_for_recording (cairo_image_surface_t *dst,
|
|||
*ix = *iy = 0;
|
||||
|
||||
source = _cairo_pattern_get_source (pattern, &limit);
|
||||
tx = limit.x;
|
||||
ty = limit.y;
|
||||
|
||||
extend = pattern->base.extend;
|
||||
if (_cairo_rectangle_contains_rectangle (&limit, sample))
|
||||
|
|
@ -734,6 +732,8 @@ _pixman_image_for_recording (cairo_image_surface_t *dst,
|
|||
limit.height = ceil (y2) - limit.y;
|
||||
}
|
||||
}
|
||||
tx = limit.x;
|
||||
ty = limit.y;
|
||||
|
||||
/* XXX transformations! */
|
||||
proxy = _cairo_surface_has_snapshot (source, &proxy_backend);
|
||||
|
|
@ -742,14 +742,18 @@ _pixman_image_for_recording (cairo_image_surface_t *dst,
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (dst->base.content == source->content)
|
||||
clone = cairo_image_surface_create (dst->format,
|
||||
limit.width, limit.height);
|
||||
else
|
||||
clone = _cairo_image_surface_create_with_content (source->content,
|
||||
limit.width,
|
||||
limit.height);
|
||||
cairo_surface_set_device_offset (clone, -limit.x, -limit.y);
|
||||
if (is_mask) {
|
||||
clone = cairo_image_surface_create (CAIRO_FORMAT_A8,
|
||||
limit.width, limit.height);
|
||||
} else {
|
||||
if (dst->base.content == source->content)
|
||||
clone = cairo_image_surface_create (dst->format,
|
||||
limit.width, limit.height);
|
||||
else
|
||||
clone = _cairo_image_surface_create_with_content (source->content,
|
||||
limit.width,
|
||||
limit.height);
|
||||
}
|
||||
|
||||
m = NULL;
|
||||
if (extend == CAIRO_EXTEND_NONE) {
|
||||
|
|
@ -774,6 +778,8 @@ done:
|
|||
pixman_image = pixman_image_ref (((cairo_image_surface_t *)clone)->pixman_image);
|
||||
cairo_surface_destroy (clone);
|
||||
|
||||
*ix = -limit.x;
|
||||
*iy = -limit.y;
|
||||
if (extend != CAIRO_EXTEND_NONE) {
|
||||
if (! _pixman_image_set_properties (pixman_image,
|
||||
&pattern->base, extents,
|
||||
|
|
@ -781,9 +787,6 @@ done:
|
|||
pixman_image_unref (pixman_image);
|
||||
pixman_image= NULL;
|
||||
}
|
||||
} else {
|
||||
*ix = -limit.x;
|
||||
*iy = -limit.y;
|
||||
}
|
||||
|
||||
return pixman_image;
|
||||
|
|
|
|||
BIN
test/reference/record-extend-none-similar.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 293 B |
BIN
test/reference/record-extend-none-similar.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 293 B |
BIN
test/reference/record-extend-none.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 293 B |
BIN
test/reference/record-extend-none.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 293 B |
BIN
test/reference/record-extend-pad-similar.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 298 B |
BIN
test/reference/record-extend-pad-similar.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 298 B |
BIN
test/reference/record-extend-pad.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 298 B |
BIN
test/reference/record-extend-pad.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 298 B |
BIN
test/reference/record-extend-reflect-similar.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 335 B |
BIN
test/reference/record-extend-reflect-similar.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 335 B |
BIN
test/reference/record-extend-reflect.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 335 B |
BIN
test/reference/record-extend-reflect.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 335 B |
BIN
test/reference/record-extend-repeat-similar.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 286 B |
BIN
test/reference/record-extend-repeat-similar.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 286 B |
BIN
test/reference/record-extend-repeat.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 286 B |
BIN
test/reference/record-extend-repeat.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 286 B |
BIN
test/reference/record-fill-alpha.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
test/reference/record-fill-alpha.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
test/reference/record-fill-alpha.base.xfail.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
test/reference/record-mesh.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
test/reference/record-mesh.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
test/reference/record-paint-alpha-clip-mask.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 330 B |
BIN
test/reference/record-paint-alpha-clip-mask.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 330 B |
BIN
test/reference/record-paint-alpha-clip-mask.base.xfail.png
Normal file
|
After Width: | Height: | Size: 337 B |
BIN
test/reference/record-paint-alpha-clip.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 269 B |
BIN
test/reference/record-paint-alpha-clip.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 269 B |
BIN
test/reference/record-paint-alpha-solid-clip.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 248 B |
BIN
test/reference/record-paint-alpha-solid-clip.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 248 B |
BIN
test/reference/record-paint-alpha.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 224 B |
BIN
test/reference/record-paint-alpha.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 224 B |
BIN
test/reference/record-paint.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 93 B |
BIN
test/reference/record-paint.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 93 B |
BIN
test/reference/record-select-font-face.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
test/reference/record-select-font-face.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
test/reference/record-self-intersecting.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 208 B |
BIN
test/reference/record-self-intersecting.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 208 B |
BIN
test/reference/record-text-transform.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
test/reference/record-text-transform.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
test/reference/record1414x-fill-alpha.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
test/reference/record1414x-fill-alpha.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
test/reference/record1414x-fill-alpha.base.xfail.png
Normal file
|
After Width: | Height: | Size: 4 KiB |
|
After Width: | Height: | Size: 466 B |
|
After Width: | Height: | Size: 466 B |
BIN
test/reference/record1414x-paint-alpha-clip.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 380 B |
BIN
test/reference/record1414x-paint-alpha-clip.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 380 B |
|
After Width: | Height: | Size: 317 B |
|
After Width: | Height: | Size: 317 B |
BIN
test/reference/record1414x-paint-alpha.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 265 B |
BIN
test/reference/record1414x-paint-alpha.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 265 B |
BIN
test/reference/record1414x-paint.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 95 B |
BIN
test/reference/record1414x-paint.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 95 B |
BIN
test/reference/record1414x-select-font-face.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
test/reference/record1414x-select-font-face.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
test/reference/record1414x-self-intersecting.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 353 B |
BIN
test/reference/record1414x-self-intersecting.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 353 B |
BIN
test/reference/record1414x-text-transform.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
test/reference/record1414x-text-transform.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
test/reference/record2x-fill-alpha.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
test/reference/record2x-fill-alpha.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
test/reference/record2x-fill-alpha.base.xfail.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 488 B |
BIN
test/reference/record2x-paint-alpha-clip-mask.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 488 B |
BIN
test/reference/record2x-paint-alpha-clip.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 322 B |
BIN
test/reference/record2x-paint-alpha-clip.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 322 B |
|
After Width: | Height: | Size: 281 B |
|
After Width: | Height: | Size: 281 B |
BIN
test/reference/record2x-paint-alpha.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 291 B |
BIN
test/reference/record2x-paint-alpha.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 291 B |
BIN
test/reference/record2x-paint.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 98 B |
BIN
test/reference/record2x-paint.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 98 B |
BIN
test/reference/record2x-select-font-face.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
test/reference/record2x-select-font-face.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
test/reference/record2x-self-intersecting.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 171 B |
BIN
test/reference/record2x-self-intersecting.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 171 B |
BIN
test/reference/record2x-text-transform.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
test/reference/record2x-text-transform.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
test/reference/record90-fill-alpha.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
test/reference/record90-fill-alpha.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 332 B |
BIN
test/reference/record90-paint-alpha-clip-mask.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 332 B |
BIN
test/reference/record90-paint-alpha-clip.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 279 B |
BIN
test/reference/record90-paint-alpha-clip.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 279 B |
|
After Width: | Height: | Size: 254 B |
|
After Width: | Height: | Size: 254 B |
BIN
test/reference/record90-paint-alpha.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 105 B |
BIN
test/reference/record90-paint-alpha.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 105 B |
BIN
test/reference/record90-paint.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 93 B |
BIN
test/reference/record90-paint.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 93 B |
BIN
test/reference/record90-select-font-face.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
test/reference/record90-select-font-face.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
test/reference/record90-self-intersecting.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 208 B |
BIN
test/reference/record90-self-intersecting.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 208 B |
BIN
test/reference/record90-text-transform.base.argb32.ref.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
test/reference/record90-text-transform.base.rgb24.ref.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |