diff options
Diffstat (limited to 'src/core/ozone')
-rw-r--r-- | src/core/ozone/gl_context_qt.cpp | 13 | ||||
-rw-r--r-- | src/core/ozone/gl_surface_egl_qt.cpp | 18 | ||||
-rw-r--r-- | src/core/ozone/gl_surface_qt.cpp | 4 | ||||
-rw-r--r-- | src/core/ozone/gl_surface_wgl_qt.cpp | 4 | ||||
-rw-r--r-- | src/core/ozone/ozone_platform_qt.cpp | 1 | ||||
-rw-r--r-- | src/core/ozone/platform_window_qt.h | 3 |
6 files changed, 29 insertions, 14 deletions
diff --git a/src/core/ozone/gl_context_qt.cpp b/src/core/ozone/gl_context_qt.cpp index ec49414b0..c4a075544 100644 --- a/src/core/ozone/gl_context_qt.cpp +++ b/src/core/ozone/gl_context_qt.cpp @@ -119,14 +119,21 @@ void* GLContextHelper::getGlXConfig() void* GLContextHelper::getEGLDisplay() { +#ifdef Q_OS_WIN + // Windows QPA plugin does not implement resourceForIntegration for "egldisplay". + // Use resourceForContext instead. + return resourceForContext(QByteArrayLiteral("egldisplay")); +#else return resourceForIntegration(QByteArrayLiteral("egldisplay")); +#endif } void* GLContextHelper::getXDisplay() { - if (QGuiApplication::platformName() != QLatin1String("xcb")) - return nullptr; - return qApp->platformNativeInterface()->nativeResourceForScreen(QByteArrayLiteral("display"), qApp->primaryScreen()); + QPlatformNativeInterface *pni = QGuiApplication::platformNativeInterface(); + if (pni) + return pni->nativeResourceForScreen(QByteArrayLiteral("display"), qApp->primaryScreen()); + return nullptr; } void* GLContextHelper::getNativeDisplay() diff --git a/src/core/ozone/gl_surface_egl_qt.cpp b/src/core/ozone/gl_surface_egl_qt.cpp index 9fe5985ce..8715a5095 100644 --- a/src/core/ozone/gl_surface_egl_qt.cpp +++ b/src/core/ozone/gl_surface_egl_qt.cpp @@ -44,9 +44,9 @@ #include "gl_context_qt.h" #include "ozone/gl_surface_egl_qt.h" -#include "ui/gl/gl_surface_egl.h" #if !defined(OS_MACOSX) #include "ui/gl/egl_util.h" +#include "ui/gl/gl_surface_egl.h" #include "ui/gl/init/gl_factory.h" // From ANGLE's egl/eglext.h. @@ -302,10 +302,6 @@ void* GLSurfacelessQtEGL::GetShareHandle() return NULL; } -} // namespace gl -#endif // !defined(OS_MACOSX) - -namespace gl { std::string DriverEGL::GetPlatformExtensions() { EGLDisplay display = GLContextHelper::getEGLDisplay(); @@ -317,3 +313,15 @@ std::string DriverEGL::GetPlatformExtensions() return str ? std::string(str) : ""; } } // namespace gl +#else +namespace gl { +struct GL_EXPORT DriverEGL { + static std::string GetPlatformExtensions(); +}; + +std::string DriverEGL::GetPlatformExtensions() +{ + return ""; +} +} // namespace gl +#endif // !defined(OS_MACOSX) diff --git a/src/core/ozone/gl_surface_qt.cpp b/src/core/ozone/gl_surface_qt.cpp index 7cde289ae..551ba888c 100644 --- a/src/core/ozone/gl_surface_qt.cpp +++ b/src/core/ozone/gl_surface_qt.cpp @@ -64,7 +64,6 @@ #include "ozone/gl_surface_wgl_qt.h" #include "gpu/ipc/service/direct_composition_surface_win.h" -#include "ui/gl/gl_context_wgl.h" #include "ui/gl/vsync_provider_win.h" #endif @@ -141,9 +140,6 @@ bool InitializeGLOneOffPlatform() { VSyncProviderWin::InitializeOneOff(); - if (GetGLImplementation() == kGLImplementationOSMesaGL) - return false; - if (GetGLImplementation() == kGLImplementationEGLGLES2) return GLSurfaceEGLQt::InitializeOneOff(); diff --git a/src/core/ozone/gl_surface_wgl_qt.cpp b/src/core/ozone/gl_surface_wgl_qt.cpp index 7c9e87b86..ac27a9c20 100644 --- a/src/core/ozone/gl_surface_wgl_qt.cpp +++ b/src/core/ozone/gl_surface_wgl_qt.cpp @@ -37,9 +37,9 @@ ** ****************************************************************************/ -#if defined(OS_WIN) - #include "gl_surface_wgl_qt.h" + +#if defined(OS_WIN) #include "ui/gl/gl_surface_wgl.h" namespace gl { diff --git a/src/core/ozone/ozone_platform_qt.cpp b/src/core/ozone/ozone_platform_qt.cpp index 905e8f403..1115f3fac 100644 --- a/src/core/ozone/ozone_platform_qt.cpp +++ b/src/core/ozone/ozone_platform_qt.cpp @@ -43,6 +43,7 @@ #include "ozone/surface_factory_qt.h" #include "ozone/platform_window_qt.h" #include "ui/display/types/native_display_delegate.h" +#include "ui/events/system_input_injector.h" #include "ui/ozone/common/stub_client_native_pixmap_factory.h" #include "ui/ozone/common/stub_overlay_manager.h" #include "ui/ozone/public/cursor_factory_ozone.h" diff --git a/src/core/ozone/platform_window_qt.h b/src/core/ozone/platform_window_qt.h index b712b706a..bb2fc714b 100644 --- a/src/core/ozone/platform_window_qt.h +++ b/src/core/ozone/platform_window_qt.h @@ -75,6 +75,9 @@ public: void MoveCursorTo(const gfx::Point&) override { } void ConfineCursorToBounds(const gfx::Rect&) override { } PlatformImeController* GetPlatformImeController() override { return nullptr; } + void SetRestoredBoundsInPixels(const gfx::Rect& bounds) override { } + gfx::Rect GetRestoredBoundsInPixels() const override { return gfx::Rect(); } + // PlatformEventDispatcher: bool CanDispatchEvent(const PlatformEvent& event) override; uint32_t DispatchEvent(const PlatformEvent& event) override; |