glcontext: Fix buffer age comparison

The old code had a dead >=3 branch, causing flickering.
This commit is contained in:
Timm Bäder 2017-03-21 19:03:27 +01:00
parent f4a24babd4
commit ec2062498f
2 changed files with 4 additions and 4 deletions

View File

@ -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])

View File

@ -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])