Bug 739096 - Cherry-pick https://gitlab.freedesktop.org/cairo/cairo/-/commit/b29d0f3d582bbafdbac1bb0b21de3994296aedf6 draft
authorJonathan Kew <jkew@mozilla.com>
Fri, 05 Feb 2021 15:04:47 +0000
changeset 3667343 3ec9a533c120c1f280695a5f0ddee3e713843ca2
parent 3667342 c82ebb25158edab58a49a6e3f119313c11b7f233
child 3667344 a2755915bc6f0ef5cf77d309ded74a9c3502ea90
push id683075
push userjkew@mozilla.com
push dateMon, 19 Apr 2021 13:53:47 +0000
treeherdertry@24dbc2b8647b [default view] [failures only]
bugs739096
milestone89.0a1
Bug 739096 - Cherry-pick https://gitlab.freedesktop.org/cairo/cairo/-/commit/b29d0f3d582bbafdbac1bb0b21de3994296aedf6 recording-surface: Fix offset error Differential Revision: https://phabricator.services.mozilla.com/D112566
gfx/cairo/cairo/src/cairo-recording-surface.c
--- a/gfx/cairo/cairo/src/cairo-recording-surface.c
+++ b/gfx/cairo/cairo/src/cairo-recording-surface.c
@@ -604,16 +604,17 @@ static cairo_status_t
 	*image_extra = NULL;
 	return CAIRO_STATUS_SUCCESS;
     }
 
     assert (! surface->unbounded);
     image = _cairo_image_surface_create_with_content (surface->base.content,
 						      surface->extents.width,
 						      surface->extents.height);
+    cairo_surface_set_device_offset (image, -surface->extents.x, -surface->extents.y);
     if (unlikely (image->status))
 	return image->status;
 
     /* Handle recursion by returning future reads from the current image */
     proxy = attach_proxy (abstract_surface, image);
     status = _cairo_recording_surface_replay (&surface->base, image);
     detach_proxy (abstract_surface, proxy);