| Summary: | [GTK] Add Wayland support to GLContextEGL | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Zan Dobersek <zan> | ||||||||||
| Component: | New Bugs | Assignee: | Zan Dobersek <zan> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | mrobinson | ||||||||||
| Priority: | P2 | ||||||||||||
| Version: | 528+ (Nightly build) | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Bug Depends on: | 136849 | ||||||||||||
| Bug Blocks: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Zan Dobersek
2014-09-15 12:07:31 PDT
Created attachment 238136 [details]
Patch
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. 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. Created attachment 238162 [details]
Patch
Created attachment 238197 [details]
Patch
Created attachment 238248 [details]
Patch
Comment on attachment 238248 [details]
Patch
Let's do this.
Comment on attachment 238248 [details] Patch Clearing flags on attachment: 238248 Committed r173716: <http://trac.webkit.org/changeset/173716> All reviewed patches have been landed. Closing bug. |