https://bugzilla.gnome.org/show_bug.cgi?id=771553

            Bug ID: 771553
           Summary: Shrinking window generates a black patch when gl is
                    used
    Classification: Platform
           Product: gtk+
           Version: 3.21.x
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: Backend: Wayland
          Assignee: gtk-b...@gtk.org
          Reporter: g...@gnome.org
        QA Contact: gtk-b...@gtk.org
                CC: r...@robster.org.uk, wayland-bugs@lists.freedesktop.org
     GNOME version: ---

Created attachment 335732
  --> https://bugzilla.gnome.org/attachment.cgi?id=335732&action=edit
Screenshot showing the problem

I am not sure why this does not affect the GLArea widget. In the WebKitGTK+
test browser, when we use gdk_cairo_draw_from_gl to paint the final rendering
to GTK+, we get this weird behaviour.

My investigation points to the tracking of the opaque region. The opaque region
is properly set on the GdkWindowWayland, but never synced. When using the
glReadPixels codepath in WebKitGTK+, the opaque region is synced for every
frame.

The reason seems to be pending_commit is never true (except for a few early
frames), so the call to sync_opaque_region is never reached:

static void
on_frame_clock_after_paint (GdkFrameClock *clock,
                            GdkWindow     *window)
{
  GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
  struct wl_callback *callback;

  if (!impl->pending_commit)
    return;
…
  gdk_wayland_window_sync_margin (window);
  gdk_wayland_window_sync_opaque_region (window);
  gdk_wayland_window_sync_input_region (window);

The reason why pending_commit is never true is it is only updated when
current_paint.use_gl is not true:

static void
gdk_window_impl_wayland_end_paint (GdkWindow *window)
{
  GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
  cairo_rectangle_int_t rect;
  int i, n;

  if (!window->current_paint.use_gl &&
      !cairo_region_is_empty (window->current_paint.region))
    {
…
      impl->pending_commit = TRUE;
    }
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
wayland-bugs mailing list
wayland-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-bugs

Reply via email to