RESOLVED FIXED 136829
[GTK] Add Wayland support to GLContextEGL
https://bugs.webkit.org/show_bug.cgi?id=136829
Summary [GTK] Add Wayland support to GLContextEGL
Zan Dobersek
Reported 2014-09-15 12:07:31 PDT
[GTK] Add Wayland support to GLContextEGL
Attachments
Patch (2.24 KB, patch)
2014-09-15 12:21 PDT, Zan Dobersek
no flags
Patch (2.63 KB, patch)
2014-09-16 02:19 PDT, Zan Dobersek
no flags
Patch (2.63 KB, patch)
2014-09-16 13:28 PDT, Zan Dobersek
no flags
Patch (2.62 KB, patch)
2014-09-17 05:39 PDT, Zan Dobersek
no flags
Zan Dobersek
Comment 1 2014-09-15 12:21:05 PDT
Martin Robinson
Comment 2 2014-09-15 18:47:58 PDT
Comment on attachment 238136 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238136&action=review > Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:46 > +#if PLATFORM(GTK) > +#include <gdk/gdk.h> > +#if PLATFORM(X11) > +#include <gdk/gdkx.h> > +#endif > +#if PLATFORM(WAYLAND) && !defined(GTK_API_VERSION_2) > +#include <gdk/gdkwayland.h> > +#endif > +#endif Sad to still see GTK+ 2 stuff here. :/ > Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:81 > +#if PLATFORM(GTK) && !defined(GTK_API_VERSION_2) > + GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get()); > #if PLATFORM(X11) > + if (GDK_IS_X11_DISPLAY(display)) > + gSharedEGLDisplay = eglGetDisplay(GLContext::sharedX11Display()); > +#endif > +#if PLATFORM(WAYLAND) > + if (GDK_IS_WAYLAND_DISPLAY(display)) > + gSharedEGLDisplay = eglGetDisplay(GLContext::sharedWaylandDisplay()); > +#endif > +#elif PLATFORM(X11) It looks like this can just be: #if PLATFORM(GTK) && !defined(GTK_API_VERSION_2) && PLATFORM(WAYLAND) GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get()); if (GDK_IS_WAYLAND_DISPLAY(display)) gSharedEGLDisplay = eglGetDisplay(GLContext::sharedWaylandDisplay()); else #endif to avoid duplicating the X11 version.
Zan Dobersek
Comment 3 2014-09-16 01:22:39 PDT
Comment on attachment 238136 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238136&action=review >> Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:81 >> +#elif PLATFORM(X11) > > It looks like this can just be: > > #if PLATFORM(GTK) && !defined(GTK_API_VERSION_2) && PLATFORM(WAYLAND) > GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get()); > if (GDK_IS_WAYLAND_DISPLAY(display)) > gSharedEGLDisplay = eglGetDisplay(GLContext::sharedWaylandDisplay()); > else > #endif > > to avoid duplicating the X11 version. OK, though I'm not a big fan of branches reaching through the #if/#endif borders.
Zan Dobersek
Comment 4 2014-09-16 02:19:13 PDT
Zan Dobersek
Comment 5 2014-09-16 13:28:50 PDT
Zan Dobersek
Comment 6 2014-09-17 05:39:29 PDT
Martin Robinson
Comment 7 2014-09-17 16:21:31 PDT
Comment on attachment 238248 [details] Patch Let's do this.
Zan Dobersek
Comment 8 2014-09-17 23:22:17 PDT
Comment on attachment 238248 [details] Patch Clearing flags on attachment: 238248 Committed r173716: <http://trac.webkit.org/changeset/173716>
Zan Dobersek
Comment 9 2014-09-17 23:22:25 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.