[Wayland-bugs] [Bug 771553] New: Shrinking window generates a black patch when gl is used

gtk+ (GNOME Bugzilla) bugzilla at gnome.org
Fri Sep 16 20:06:40 UTC 2016


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-bugs at gtk.org
          Reporter: gns at gnome.org
        QA Contact: gtk-bugs at gtk.org
                CC: rob at robster.org.uk, wayland-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20160916/0104f918/attachment-0001.html>


More information about the wayland-bugs mailing list