summaryrefslogtreecommitdiff
path: root/mozilla-1460603.patch
diff options
context:
space:
mode:
Diffstat (limited to 'mozilla-1460603.patch')
-rw-r--r--mozilla-1460603.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/mozilla-1460603.patch b/mozilla-1460603.patch
new file mode 100644
index 0000000..3e705b5
--- /dev/null
+++ b/mozilla-1460603.patch
@@ -0,0 +1,46 @@
+diff -up firefox-60.0.1/gfx/gl/GLLibraryEGL.cpp.mozilla-1460603 firefox-60.0.1/gfx/gl/GLLibraryEGL.cpp
+--- firefox-60.0.1/gfx/gl/GLLibraryEGL.cpp.mozilla-1460603 2018-05-16 07:38:30.000000000 +0200
++++ firefox-60.0.1/gfx/gl/GLLibraryEGL.cpp 2018-05-25 10:58:45.170047851 +0200
+@@ -31,6 +31,13 @@
+ #include "GLContextProvider.h"
+ #include "gfxPrefs.h"
+ #include "ScopedGLHelpers.h"
++#ifdef MOZ_WIDGET_GTK
++#include <gdk/gdk.h>
++#ifdef MOZ_WAYLAND
++#include <gdk/gdkwayland.h>
++#include <dlfcn.h>
++#endif // MOZ_WIDGET_GTK
++#endif // MOZ_WAYLAND
+
+ namespace mozilla {
+ namespace gl {
+@@ -566,7 +573,22 @@ GLLibraryEGL::EnsureInitialized(bool for
+ mIsWARP = true;
+ }
+ } else {
+- chosenDisplay = GetAndInitDisplay(*this, EGL_DEFAULT_DISPLAY);
++ void *nativeDisplay = EGL_DEFAULT_DISPLAY;
++#ifdef MOZ_WAYLAND
++ // Some drivers doesn't support EGL_DEFAULT_DISPLAY
++ GdkDisplay *gdkDisplay = gdk_display_get_default();
++ if (GDK_IS_WAYLAND_DISPLAY(gdkDisplay)) {
++ static auto sGdkWaylandDisplayGetWlDisplay =
++ (wl_display *(*)(GdkDisplay *))
++ dlsym(RTLD_DEFAULT, "gdk_wayland_display_get_wl_display");
++ nativeDisplay = sGdkWaylandDisplayGetWlDisplay(gdkDisplay);
++ if (!nativeDisplay) {
++ NS_WARNING("Failed to get wl_display.");
++ return false;
++ }
++ }
++#endif
++ chosenDisplay = GetAndInitDisplay(*this, nativeDisplay);
+ }
+
+ if (!chosenDisplay) {
+@@ -872,4 +894,3 @@ AfterEGLCall(const char* glFunction)
+
+ } /* namespace gl */
+ } /* namespace mozilla */
+-
bgstack15