[gtk+] glcontext: Fix buffer age comparison
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] glcontext: Fix buffer age comparison
- Date: Tue, 21 Mar 2017 18:04:45 +0000 (UTC)
commit ec2062498f96c0f78ddf4e0c05dd2176956d6791
Author: Timm Bäder <mail baedert org>
Date: Tue Mar 21 19:03:27 2017 +0100
glcontext: Fix buffer age comparison
The old code had a dead >=3 branch, causing flickering.
gdk/wayland/gdkglcontext-wayland.c | 4 ++--
gdk/x11/gdkglcontext-x11.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gdk/wayland/gdkglcontext-wayland.c b/gdk/wayland/gdkglcontext-wayland.c
index f75e210..82233cf 100644
--- a/gdk/wayland/gdkglcontext-wayland.c
+++ b/gdk/wayland/gdkglcontext-wayland.c
@@ -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])
diff --git a/gdk/x11/gdkglcontext-x11.c b/gdk/x11/gdkglcontext-x11.c
index 8eb2cab..d76c29e 100644
--- a/gdk/x11/gdkglcontext-x11.c
+++ b/gdk/x11/gdkglcontext-x11.c
@@ -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])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]