Merge branch 'fix-snapshot' into 'master'

snapshot: Fix assert if paint gets scheduled immediately

See merge request GNOME/gtk!2032
This commit is contained in:
Benjamin Otte 2020-06-04 13:43:44 +00:00
commit aa8a061a83

View File

@ -231,7 +231,10 @@ draw_paintable (GdkPaintable *paintable,
cairo_t *cr;
if (!reftest_uninhibit_snapshot ())
return;
{
reftest_inhibit_snapshot();
return;
}
snapshot = gtk_snapshot_new ();
gdk_paintable_snapshot (paintable,
@ -244,7 +247,10 @@ draw_paintable (GdkPaintable *paintable,
* the invalidations were only side effects of resizes.
*/
if (node == NULL)
return;
{
reftest_inhibit_snapshot();
return;
}
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
gdk_paintable_get_intrinsic_width (paintable),