Last active
May 19, 2017 01:42
-
-
Save penk/8798741 to your computer and use it in GitHub Desktop.
Enabled Oxide WebView on EGLFS QPA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- oxide-qt-1.5.5.orig/qt/core/browser/oxide_qt_browser_startup.cc | |
+++ oxide-qt-1.5.5/qt/core/browser/oxide_qt_browser_startup.cc | |
@@ -155,7 +155,7 @@ void BrowserStartup::EnsureChromiumStart | |
if (platform == QLatin1String("xcb")) { | |
supported_gl_impls |= oxide::SUPPORTED_GL_IMPL_DESKTOP_GL; | |
supported_gl_impls |= oxide::SUPPORTED_GL_IMPL_EGL_GLES2; | |
- } else if (platform.startsWith("ubuntu")) { | |
+ } else if (platform.startsWith("ubuntu") || platform.startsWith("egl")) { | |
supported_gl_impls |= oxide::SUPPORTED_GL_IMPL_EGL_GLES2; | |
} else { | |
LOG(WARNING) << "Unrecognized Qt platform: " << qPrintable(platform); | |
--- oxide-qt-1.5.5.orig/qt/core/common/oxide_qt_screen_utils.cc | |
+++ oxide-qt-1.5.5/qt/core/common/oxide_qt_screen_utils.cc | |
@@ -84,7 +84,7 @@ float GetDeviceScaleFactorFromQScreen(QS | |
} | |
QString platform = QGuiApplication::platformName(); | |
- if (platform.startsWith("ubuntu")) { | |
+ if (platform.startsWith("ubuntu") || platform.startsWith("egl")) { | |
QByteArray grid_unit_px(qgetenv("GRID_UNIT_PX")); | |
bool ok; | |
float scale = grid_unit_px.toFloat(&ok); | |
--- oxide-qt-1.5.5.orig/qt/core/gpu/oxide_qt_gl_context_adopted.cc | |
+++ oxide-qt-1.5.5/qt/core/gpu/oxide_qt_gl_context_adopted.cc | |
@@ -66,7 +66,7 @@ scoped_refptr<GLContextAdopted> GLContex | |
gfx::kGLImplementationEGLGLES2, | |
share_group)); | |
} | |
- } else if (platform.startsWith("ubuntu")) { | |
+ } else if (platform.startsWith("ubuntu") || platform.startsWith("egl")) { | |
void* handle = pni->nativeResourceForContext("eglcontext", context); | |
if (handle) { | |
return make_scoped_refptr( | |
--- oxide-qt-1.5.5.orig/shared/browser/oxide_gpu_info_collector_linux.cc | |
+++ oxide-qt-1.5.5/shared/browser/oxide_gpu_info_collector_linux.cc | |
@@ -193,6 +193,10 @@ std::string CollectDriverVersionATI() { | |
// Use NVCtrl extention to query NV driver version. | |
// Return empty string on failing. | |
std::string CollectDriverVersionNVidia() { | |
+ // Return empty string if we're using GLES2 and there's no libX11 | |
+ if (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2) { | |
+ return std::string(); | |
+ } | |
Display* display = gfx::GetXDisplay(); | |
if (!display) { | |
LOG(ERROR) << "XOpenDisplay failed."; | |
--- oxide-qt-1.5.5.orig/shared/port/ozone/surface_factory_ozone_oxide.cc | |
+++ oxide-qt-1.5.5/shared/port/ozone/surface_factory_ozone_oxide.cc | |
@@ -36,7 +36,8 @@ const int32* SurfaceFactoryOzoneOxide::G | |
// This detection is a bit of a hack. Not sure if there's a better way | |
// to do this? | |
char* egl_platform = getenv("EGL_PLATFORM"); | |
- if (!egl_platform || strcmp(egl_platform, "mir") != 0) { | |
+ if (!egl_platform || | |
+ ((strcmp(egl_platform, "mir") != 0) && (strcmp(egl_platform, "drm") != 0))) { | |
return desired_list; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment