diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-02-23 14:43:14 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-04-15 18:11:44 +0200 |
commit | 027e7e574e7a4488d47cd4133e98d518210b1e56 (patch) | |
tree | c45f05457509b7d99c39a3889119c04c4aee39e3 /src/core/ozone | |
parent | 2dce0008ce53d27d281ad2dc00eb32d25ae5fc84 (diff) |
Adaptations for Chromium 88
Change-Id: Ie66e95dbb9fbcafe961bb98d5c277f8c32d66b96
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/core/ozone')
-rw-r--r-- | src/core/ozone/gl_context_qt.cpp | 4 | ||||
-rw-r--r-- | src/core/ozone/gl_surface_glx_qt.cpp | 4 | ||||
-rw-r--r-- | src/core/ozone/gl_surface_glx_qt.h | 4 | ||||
-rw-r--r-- | src/core/ozone/platform_window_qt.cpp | 2 | ||||
-rw-r--r-- | src/core/ozone/platform_window_qt.h | 2 |
5 files changed, 6 insertions, 10 deletions
diff --git a/src/core/ozone/gl_context_qt.cpp b/src/core/ozone/gl_context_qt.cpp index f4d3f1618..1b1cef485 100644 --- a/src/core/ozone/gl_context_qt.cpp +++ b/src/core/ozone/gl_context_qt.cpp @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context(); -GLContextHelper* GLContextHelper::contextHelper = 0; +GLContextHelper* GLContextHelper::contextHelper = nullptr; namespace { @@ -95,7 +95,7 @@ void GLContextHelper::initialize() void GLContextHelper::destroy() { delete contextHelper; - contextHelper = 0; + contextHelper = nullptr; } bool GLContextHelper::initializeContextOnBrowserThread(gl::GLContext* context, gl::GLSurface* surface, gl::GLContextAttribs attribs) diff --git a/src/core/ozone/gl_surface_glx_qt.cpp b/src/core/ozone/gl_surface_glx_qt.cpp index 188a92729..4f4bd1371 100644 --- a/src/core/ozone/gl_surface_glx_qt.cpp +++ b/src/core/ozone/gl_surface_glx_qt.cpp @@ -45,7 +45,6 @@ #include "ozone/gl_surface_glx_qt.h" #include "ui/gl/gl_bindings.h" #include "ui/gl/gl_surface_glx.h" -#include "ui/gfx/x/x11_types.h" namespace gl { @@ -58,6 +57,7 @@ GLSurfaceGLXQt::~GLSurfaceGLXQt() void GLSurfaceGLX::ShutdownOneOff() { + s_initialized = false; } bool GLSurfaceGLX::IsCreateContextSupported() @@ -120,8 +120,6 @@ bool GLSurfaceGLXQt::InitializeOneOff() if (s_initialized) return true; - XInitThreads(); - g_display = GLContextHelper::getXDisplay(); if (!g_display) { LOG(ERROR) << "GLContextHelper::getXDisplay() failed."; diff --git a/src/core/ozone/gl_surface_glx_qt.h b/src/core/ozone/gl_surface_glx_qt.h index e894423b7..fb17c5aca 100644 --- a/src/core/ozone/gl_surface_glx_qt.h +++ b/src/core/ozone/gl_surface_glx_qt.h @@ -42,8 +42,6 @@ #include "gl_surface_qt.h" -#include "ui/gfx/x/x11_types.h" - namespace gl { class GLSurfaceGLXQt: public GLSurfaceQt { @@ -62,7 +60,7 @@ protected: private: static bool s_initialized; - XID m_surfaceBuffer; + int m_surfaceBuffer; DISALLOW_COPY_AND_ASSIGN(GLSurfaceGLXQt); }; diff --git a/src/core/ozone/platform_window_qt.cpp b/src/core/ozone/platform_window_qt.cpp index 757c042f0..42af77774 100644 --- a/src/core/ozone/platform_window_qt.cpp +++ b/src/core/ozone/platform_window_qt.cpp @@ -59,7 +59,7 @@ PlatformWindowQt::~PlatformWindowQt() ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); } -gfx::Rect PlatformWindowQt::GetBounds() +gfx::Rect PlatformWindowQt::GetBounds() const { return bounds_; } diff --git a/src/core/ozone/platform_window_qt.h b/src/core/ozone/platform_window_qt.h index b1021df9d..dbeb320ac 100644 --- a/src/core/ozone/platform_window_qt.h +++ b/src/core/ozone/platform_window_qt.h @@ -56,7 +56,7 @@ public: PlatformWindowQt(PlatformWindowDelegate* delegate, const gfx::Rect& bounds); ~PlatformWindowQt() override; // PlatformWindow: - gfx::Rect GetBounds() override; + gfx::Rect GetBounds() const override; void SetBounds(const gfx::Rect& bounds) override; void Show(bool inactive = false) override { } void Hide() override { } |