<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Shrinking window generates a black patch when gl is used"
href="https://bugzilla.gnome.org/show_bug.cgi?id=771553">771553</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Shrinking window generates a black patch when gl is used
</td>
</tr>
<tr>
<th>Classification</th>
<td>Platform
</td>
</tr>
<tr>
<th>Product</th>
<td>gtk+
</td>
</tr>
<tr>
<th>Version</th>
<td>3.21.x
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>Normal
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: Wayland
</td>
</tr>
<tr>
<th>Assignee</th>
<td>gtk-bugs@gtk.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>gns@gnome.org
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>gtk-bugs@gtk.org
</td>
</tr>
<tr>
<th>CC</th>
<td>rob@robster.org.uk, wayland-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>GNOME version</th>
<td>---
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=335732" name="attach_335732" title="Screenshot showing the problem">attachment 335732</a> <a href="attachment.cgi?id=335732&action=edit" title="Screenshot showing the problem">[details]</a></span>
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;
}
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>