From: Gustavo Noronha Silva Date: Mon, 26 Sep 2016 08:56:42 +0000 (+0200) Subject: wayland: always sync state after a frame is painted X-Git-Tag: archive/raspbian/3.22.6-1+rpi1~1^2^2^2^2^2^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=10b014ca613b096191ae4b9cc7034e58ec2a12d0;p=gtk%2B3.0.git wayland: always sync state after a frame is painted Opaque region, margin and input region were only being synced when a cairo paint happened. That caused GL paints to sometimes end up with bad state. Move calls to sync state to gdk_window_impl_wayland_end_paint. https://bugzilla.gnome.org/show_bug.cgi?id=771553 Gbp-Pq: Name wayland-always-sync-state-after-a-frame-is-painted.patch --- diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index fa8dbe0e87..59cdf0242d 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -597,10 +597,6 @@ on_frame_clock_after_paint (GdkFrameClock *clock, if (impl->pending_buffer_attached) read_back_cairo_surface (window); - gdk_wayland_window_sync_margin (window); - gdk_wayland_window_sync_opaque_region (window); - gdk_wayland_window_sync_input_region (window); - /* From this commit forward, we can't write to the buffer, * it's "live". In the future, if we need to stage more changes * we have to allocate a new staging buffer and draw to it instead. @@ -936,6 +932,10 @@ gdk_window_impl_wayland_end_paint (GdkWindow *window) impl->pending_commit = TRUE; } + + gdk_wayland_window_sync_margin (window); + gdk_wayland_window_sync_opaque_region (window); + gdk_wayland_window_sync_input_region (window); } static gboolean