mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
glcontext: Fix buffer age comparison
The old code had a dead >=3 branch, causing flickering.
This commit is contained in:
parent
f4a24babd4
commit
ec2062498f
@ -180,12 +180,12 @@ gdk_wayland_gl_context_get_damage (GdkGLContext *context)
|
||||
eglQuerySurface (display_wayland->egl_display, egl_surface,
|
||||
EGL_BUFFER_AGE_EXT, &buffer_age);
|
||||
|
||||
if (buffer_age >= 2)
|
||||
if (buffer_age == 2)
|
||||
{
|
||||
if (window->old_updated_area[0])
|
||||
return cairo_region_copy (window->old_updated_area[0]);
|
||||
}
|
||||
else if (buffer_age >= 3)
|
||||
else if (buffer_age == 3)
|
||||
{
|
||||
if (window->old_updated_area[0] &&
|
||||
window->old_updated_area[1])
|
||||
|
@ -212,12 +212,12 @@ gdk_x11_gl_context_get_damage (GdkGLContext *context)
|
||||
glXQueryDrawable(dpy, shared_x11->attached_drawable,
|
||||
GLX_BACK_BUFFER_AGE_EXT, &buffer_age);
|
||||
|
||||
if (buffer_age >= 2)
|
||||
if (buffer_age == 2)
|
||||
{
|
||||
if (window->old_updated_area[0])
|
||||
return cairo_region_copy (window->old_updated_area[0]);
|
||||
}
|
||||
else if (buffer_age >= 3)
|
||||
else if (buffer_age == 3)
|
||||
{
|
||||
if (window->old_updated_area[0] &&
|
||||
window->old_updated_area[1])
|
||||
|
Loading…
Reference in New Issue
Block a user