summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdk/gdkcairo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/gdkcairo.c b/gdk/gdkcairo.c
index 066f5c434d..c54121599c 100644
--- a/gdk/gdkcairo.c
+++ b/gdk/gdkcairo.c
@@ -477,6 +477,9 @@ gdk_cairo_region_create_from_surface (cairo_surface_t *surface)
else
image = cairo_surface_reference (surface);
+ /* Flush the surface to make sure that the rendering is up to date. */
+ cairo_surface_flush (image);
+
data = cairo_image_surface_get_data (image);
stride = cairo_image_surface_get_stride (image);