diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-10-12 15:27:23 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-11-28 13:32:50 +0100 |
commit | b104487f072cd04ca4301ba1f10d3ad2e874569e (patch) | |
tree | 920c6e6fcabdcaff9e4c9f8ead2e6b0c289f99eb /src/core/ozone/gl_surface_qt.cpp | |
parent | 2d002e42a8b6e711e3c9ca5b6dd3611e9d8426ab (diff) |
Adaptations for 106-based
Change-Id: I2fe91c06ce91dfaace7825a0589b56ee375479b6
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/ozone/gl_surface_qt.cpp')
-rw-r--r-- | src/core/ozone/gl_surface_qt.cpp | 66 |
1 files changed, 11 insertions, 55 deletions
diff --git a/src/core/ozone/gl_surface_qt.cpp b/src/core/ozone/gl_surface_qt.cpp index 0d7f686e8..2e76110f9 100644 --- a/src/core/ozone/gl_surface_qt.cpp +++ b/src/core/ozone/gl_surface_qt.cpp @@ -88,17 +88,18 @@ void* GLSurfaceQt::GetConfig() #if BUILDFLAG(IS_WIN) namespace init { -bool InitializeGLOneOffPlatform(uint64_t system_device_id) + +gl::GLDisplay *InitializeGLOneOffPlatform(uint64_t system_device_id) { VSyncProviderWin::InitializeOneOff(); if (GetGLImplementation() == kGLImplementationEGLGLES2 || GetGLImplementation() == kGLImplementationEGLANGLE) - return GLSurfaceEGLQt::InitializeOneOff(); + return GLSurfaceEGLQt::InitializeOneOff(system_device_id); if (GetGLImplementation() == kGLImplementationDesktopGL || GetGLImplementation() == kGLImplementationDesktopGLCoreProfile) - return GLSurfaceWGLQt::InitializeOneOff(); + return GLSurfaceWGLQt::InitializeOneOff(system_device_id); - return false; + return nullptr; } bool usingSoftwareDynamicGL() @@ -111,7 +112,7 @@ bool usingSoftwareDynamicGL() } scoped_refptr<GLSurface> -CreateOffscreenGLSurfaceWithFormat(const gfx::Size& size, GLSurfaceFormat format) +CreateOffscreenGLSurfaceWithFormat(GLDisplay *display, const gfx::Size& size, GLSurfaceFormat format) { scoped_refptr<GLSurface> surface; switch (GetGLImplementation()) { @@ -124,7 +125,7 @@ CreateOffscreenGLSurfaceWithFormat(const gfx::Size& size, GLSurfaceFormat format } case kGLImplementationEGLANGLE: case kGLImplementationEGLGLES2: { - surface = new GLSurfaceEGLQt(size); + surface = new GLSurfaceEGLQt(static_cast<gl::GLDisplayEGL*>(display), size); if (surface->Initialize(format)) return surface; @@ -132,7 +133,7 @@ CreateOffscreenGLSurfaceWithFormat(const gfx::Size& size, GLSurfaceFormat format // is not available since some implementations of surfaceless context // have problems. (e.g. QTBUG-57290) if (GLSurfaceEGLQt::g_egl_surfaceless_context_supported) { - surface = new GLSurfacelessQtEGL(size); + surface = new GLSurfacelessQtEGL(static_cast<gl::GLDisplayEGL*>(display), size); if (surface->Initialize(format)) return surface; } @@ -163,59 +164,14 @@ CreateViewGLSurface(gfx::AcceleratedWidget window) namespace gpu { class GpuCommandBufferStub; class GpuChannelManager; -scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface(base::WeakPtr<ImageTransportSurfaceDelegate>, +scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface(gl::GLDisplay *, + base::WeakPtr<ImageTransportSurfaceDelegate>, SurfaceHandle, gl::GLSurfaceFormat) { QT_NOT_USED return scoped_refptr<gl::GLSurface>(); } } // namespace gpu - -namespace gl { - -bool DirectCompositionSurfaceWin::IsDirectCompositionSupported() -{ - return false; -} - -bool DirectCompositionSurfaceWin::IsDecodeSwapChainSupported() -{ - return false; -} - -bool DirectCompositionSurfaceWin::IsHDRSupported() -{ - return false; -} - -bool DirectCompositionSurfaceWin::IsSwapChainTearingSupported() -{ - return false; -} - -bool DirectCompositionSurfaceWin::AreOverlaysSupported() -{ - return false; -} - -UINT DirectCompositionSurfaceWin::GetOverlaySupportFlags(DXGI_FORMAT format) -{ - Q_UNUSED(format); - return 0; -} - -void DirectCompositionSurfaceWin::DisableDecodeSwapChain() -{ -} - -void DirectCompositionSurfaceWin::DisableSoftwareOverlays() -{ -} - -void DirectCompositionSurfaceWin::ShutdownOneOff() -{ -} - -} // namespace gl #endif // BUILDFLAG(IS_WIN) + #endif // !defined(Q_OS_MACOS) |