summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-02-19 12:54:27 +0100
committerMichal Klocek <michal.klocek@qt.io>2018-07-27 13:08:01 +0000
commitd4ae420c54b0e8b4660b5c41ec0c38049115f9a9 (patch)
treef49c7fcea0d82be312076e0648efa5c2f6f26219
parentf7e094b3c3b91e8b1652547b5a6f6be46f0618df (diff)
downloadqtwebengine-chromium-d4ae420c54b0e8b4660b5c41ec0c38049115f9a9.tar.gz
Switch to use glx over ozone
Use ozone glx instead of x11 glx. Task-number: QTBUG-65682 Change-Id: I612ff7993812607a170a42c4fe72abd9913ef0c5 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--chromium/content/browser/renderer_host/pepper/pepper_truetype_font_list_ozone.cc2
-rw-r--r--chromium/ui/gfx/x/x11_types.cc8
-rw-r--r--chromium/ui/gl/gl_bindings.h7
-rw-r--r--chromium/ui/gl/gl_bindings_autogen_glx.cc4
-rw-r--r--chromium/ui/gl/gl_surface_glx.cc6
-rw-r--r--chromium/ui/gl/init/gl_factory_ozone.cc2
-rw-r--r--chromium/ui/gl/init/gl_initializer_ozone.cc2
-rw-r--r--chromium/ui/ozone/BUILD.gn2
8 files changed, 21 insertions, 12 deletions
diff --git a/chromium/content/browser/renderer_host/pepper/pepper_truetype_font_list_ozone.cc b/chromium/content/browser/renderer_host/pepper/pepper_truetype_font_list_ozone.cc
index 12e2c61a8cf..e8b81080c86 100644
--- a/chromium/content/browser/renderer_host/pepper/pepper_truetype_font_list_ozone.cc
+++ b/chromium/content/browser/renderer_host/pepper/pepper_truetype_font_list_ozone.cc
@@ -5,6 +5,7 @@
#include "base/logging.h"
#include "content/browser/renderer_host/pepper/pepper_truetype_font_list.h"
+#ifndef TOOLKIT_QT
namespace content {
void GetFontFamilies_SlowBlocking(std::vector<std::string>* font_families) {
@@ -18,3 +19,4 @@ void GetFontsInFamily_SlowBlocking(
}
} // namespace content
+#endif
diff --git a/chromium/ui/gfx/x/x11_types.cc b/chromium/ui/gfx/x/x11_types.cc
index 3858212aa36..0661bceb808 100644
--- a/chromium/ui/gfx/x/x11_types.cc
+++ b/chromium/ui/gfx/x/x11_types.cc
@@ -11,15 +11,13 @@
#include "build/build_config.h"
#include "ui/gfx/x/x11_switches.h"
-#ifdef TOOLKIT_QT
-extern XDisplay* GetQtXDisplay();
-#endif
-
namespace gfx {
XDisplay* GetXDisplay() {
#ifdef TOOLKIT_QT
- return GetQtXDisplay();
+ // this should never be called
+ DCHECK(false);
+ return nullptr;
#else
static XDisplay* display = NULL;
if (!display)
diff --git a/chromium/ui/gl/gl_bindings.h b/chromium/ui/gl/gl_bindings.h
index 1c493e5e050..32290b74228 100644
--- a/chromium/ui/gl/gl_bindings.h
+++ b/chromium/ui/gl/gl_bindings.h
@@ -522,13 +522,20 @@ struct GL_EXPORT DriverEGL {
#if defined(USE_GLX)
struct GL_EXPORT DriverGLX {
void InitializeStaticBindings();
+#ifdef TOOLKIT_QT
+ void InitializeExtensionBindings(const std::string&);
+#else
void InitializeExtensionBindings();
+#endif
+
void ClearBindings();
ProcsGLX fn;
ExtensionsGLX ext;
+#ifndef TOOLKIT_QT
private:
+#endif
static std::string GetPlatformExtensions();
};
#endif
diff --git a/chromium/ui/gl/gl_bindings_autogen_glx.cc b/chromium/ui/gl/gl_bindings_autogen_glx.cc
index 44d539162d2..2f4c0c219a3 100644
--- a/chromium/ui/gl/gl_bindings_autogen_glx.cc
+++ b/chromium/ui/gl/gl_bindings_autogen_glx.cc
@@ -108,8 +108,12 @@ void DriverGLX::InitializeStaticBindings() {
fn.glXWaitXFn = reinterpret_cast<glXWaitXProc>(GetGLProcAddress("glXWaitX"));
}
+#ifdef TOOLKIT_QT
+void DriverGLX::InitializeExtensionBindings(const std::string& platform_extensions) {
+#else
void DriverGLX::InitializeExtensionBindings() {
std::string platform_extensions(GetPlatformExtensions());
+#endif
ExtensionSet extensions(MakeExtensionSet(platform_extensions));
ALLOW_UNUSED_LOCAL(extensions);
diff --git a/chromium/ui/gl/gl_surface_glx.cc b/chromium/ui/gl/gl_surface_glx.cc
index cfca601a772..5ccac9d5b89 100644
--- a/chromium/ui/gl/gl_surface_glx.cc
+++ b/chromium/ui/gl/gl_surface_glx.cc
@@ -457,9 +457,11 @@ bool GLSurfaceGLX::InitializeOneOff() {
bool GLSurfaceGLX::InitializeExtensionSettingsOneOff() {
if (!initialized_)
return false;
-
+#ifdef TOOLKIT_QT
+ g_driver_glx.InitializeExtensionBindings(g_driver_glx.GetPlatformExtensions());
+#else
g_driver_glx.InitializeExtensionBindings();
-
+#endif
g_glx_context_create = HasGLXExtension("GLX_ARB_create_context");
g_glx_create_context_robustness_supported =
HasGLXExtension("GLX_ARB_create_context_robustness");
diff --git a/chromium/ui/gl/init/gl_factory_ozone.cc b/chromium/ui/gl/init/gl_factory_ozone.cc
index 4f0b30aaae0..8b35da419dd 100644
--- a/chromium/ui/gl/init/gl_factory_ozone.cc
+++ b/chromium/ui/gl/init/gl_factory_ozone.cc
@@ -30,7 +30,6 @@ bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) {
return false;
}
-#if !defined(TOOLKIT_QT)
scoped_refptr<GLContext> CreateGLContext(GLShareGroup* share_group,
GLSurface* compatible_surface,
const GLContextAttribs& attribs) {
@@ -105,7 +104,6 @@ scoped_refptr<GLSurface> CreateOffscreenGLSurfaceWithFormat(
return nullptr;
}
-#endif
void SetDisabledExtensionsPlatform(const std::string& disabled_extensions) {
if (HasGLOzone()) {
diff --git a/chromium/ui/gl/init/gl_initializer_ozone.cc b/chromium/ui/gl/init/gl_initializer_ozone.cc
index 7749343cf06..a42e220e2ba 100644
--- a/chromium/ui/gl/init/gl_initializer_ozone.cc
+++ b/chromium/ui/gl/init/gl_initializer_ozone.cc
@@ -13,7 +13,6 @@
namespace gl {
namespace init {
-#if !defined(TOOLKIT_QT)
bool InitializeGLOneOffPlatform() {
if (HasGLOzone())
return GetGLOzone()->InitializeGLOneOffPlatform();
@@ -27,7 +26,6 @@ bool InitializeGLOneOffPlatform() {
}
return false;
}
-#endif
bool InitializeStaticGLBindings(GLImplementation implementation) {
// Prevent reinitialization with a different implementation. Once the gpu
diff --git a/chromium/ui/ozone/BUILD.gn b/chromium/ui/ozone/BUILD.gn
index de8d7a6d4e7..5e0a31d084e 100644
--- a/chromium/ui/ozone/BUILD.gn
+++ b/chromium/ui/ozone/BUILD.gn
@@ -43,7 +43,7 @@ if (ozone_platform_wayland) {
ozone_platform_test_deps += [ "platform/wayland:wayland_unittests" ]
}
-if (ozone_platform_x11) {
+if (ozone_platform_x11 && !use_qt) {
ozone_platforms += [ "x11" ]
ozone_platform_deps += [ "platform/x11" ]
}