https://bugzilla.gnome.org/show_bug.cgi?id=769835

Emmanuele Bassi (:ebassi) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #342410|none                        |needs-work
             status|                            |

--- Comment #17 from Emmanuele Bassi (:ebassi) <[email protected]> ---
Review of attachment 342410:

::: gdk/wayland/gdkglcontext-wayland.c
@@ +441,3 @@
+static gboolean
+egl_config_can_disable_swap_interval (GdkDisplay      *display,
+                                      const EGLConfig *config)

EGLConfig is already a pointer; I don't think you need to pass it as a pointer…

@@ +446,3 @@
+  EGLint interval;
+
+  if (!eglGetConfigAttrib (display_wayland->egl_display, *config,

… especially since you're just dereferencing it here.

@@ +483,3 @@
     return NULL;

+  if (!egl_config_can_disable_swap_interval (display, &config))

I'm not convinced this is an appropriate action to take.

If swap interval cannot be disabled then we should fall back to the existing
behaviour; it's not optimal, but saying "you can't have GL because your driver
does not allow disabling swap interval" seems to me far more drastic than
necessary.

Just save the return value inside the GdkGLContext and emit a warning or a
debug message.

@@ +543,3 @@
       eglMakeCurrent(display_wayland->egl_display, EGL_NO_SURFACE,
EGL_NO_SURFACE,
                      EGL_NO_CONTEXT);
+      eglSwapInterval (dpy, 0);

Not sure it's needed, here; we're unbinding everything, which means there's no
context and no surface to swap.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
wayland-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-bugs

Reply via email to