diff options
Diffstat (limited to 'src/core/ozone/gl_surface_wgl_qt.cpp')
-rw-r--r-- | src/core/ozone/gl_surface_wgl_qt.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/core/ozone/gl_surface_wgl_qt.cpp b/src/core/ozone/gl_surface_wgl_qt.cpp index 0d830451a..db4aed884 100644 --- a/src/core/ozone/gl_surface_wgl_qt.cpp +++ b/src/core/ozone/gl_surface_wgl_qt.cpp @@ -3,7 +3,8 @@ #include "gl_surface_wgl_qt.h" -#if defined(OS_WIN) +#if BUILDFLAG(IS_WIN) +#include "ui/gl/gl_display_manager.h" #include "ui/gl/gl_surface_wgl.h" namespace gl { @@ -19,9 +20,12 @@ GLSurfaceWGLQt::~GLSurfaceWGLQt() Destroy(); } -bool GLSurfaceWGLQt::InitializeOneOff() +gl::GLDisplay *GLSurfaceWGLQt::InitializeOneOff(gl::GpuPreference gpu_preference) { - return GLSurfaceWGL::InitializeOneOff(); + if (GLSurfaceWGL::InitializeOneOff()) + return GLDisplayManagerWGL::GetInstance()->GetDisplay(gpu_preference); + + return nullptr; } bool GLSurfaceWGLQt::Initialize(GLSurfaceFormat format) @@ -41,9 +45,9 @@ void *GLSurfaceWGLQt::GetHandle() return m_surfaceBuffer->GetHandle(); } -void *GLSurfaceWGLQt::GetDisplay() +GLDisplay *GLSurfaceWGLQt::GetGLDisplay() { - return m_surfaceBuffer->GetDisplay(); + return m_surfaceBuffer->GetGLDisplay(); } void *GLSurfaceWGLQt::GetConfig() @@ -53,4 +57,4 @@ void *GLSurfaceWGLQt::GetConfig() } //namespace gl -#endif // defined(OS_WIN) +#endif // BUILDFLAG(IS_WIN) |