diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2021-04-19 13:05:09 +0200 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2021-04-20 14:31:46 +0200 |
commit | bf1bbec91d007594023a090d0ae447746277fdf9 (patch) | |
tree | 6afee97a1965022c199cdfc0ce1f17076fa5ca9d /src/core/ozone | |
parent | 9b1e97d28f6186a30a25e7b4d7bba2bbd3f2080f (diff) |
Clean up gl_surface_qt.cpp
Change-Id: I0621c2c5cca8fd1d028a25f6f43faeb8ce23b8fd
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/ozone')
-rw-r--r-- | src/core/ozone/gl_surface_qt.cpp | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/src/core/ozone/gl_surface_qt.cpp b/src/core/ozone/gl_surface_qt.cpp index 2c464c11c..3fb4746f4 100644 --- a/src/core/ozone/gl_surface_qt.cpp +++ b/src/core/ozone/gl_surface_qt.cpp @@ -41,41 +41,27 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE.Chromium file. -#include "gl_surface_qt.h" - #if !defined(OS_MAC) -#include <QGuiApplication> -#include "gl_context_qt.h" +#include "gl_surface_qt.h" #include "qtwebenginecoreglobal_p.h" -#include "web_engine_context.h" -#include "ozone/gl_surface_egl_qt.h" #include "base/logging.h" -#include "base/threading/thread_restrictions.h" -#include "gpu/ipc/service/image_transport_surface.h" -#include "ui/gl/gl_bindings.h" -#include "ui/gl/gl_context.h" -#include "ui/gl/gl_implementation.h" -#include "ui/gl/init/gl_initializer.h" -#include "ui/gl/init/gl_factory.h" -#include "ui/gl/gl_gl_api_implementation.h" + #if defined(OS_WIN) +#include "web_engine_context.h" #include "ozone/gl_surface_wgl_qt.h" +#include "ozone/gl_surface_egl_qt.h" +#include "gpu/ipc/service/image_transport_surface.h" +#include "ui/gl/gl_implementation.h" #include "ui/gl/direct_composition_surface_win.h" #include "ui/gl/vsync_provider_win.h" #endif -#include "ozone/gl_surface_egl_qt.h" -#include "ui/gl/gl_egl_api_implementation.h" namespace gl { -namespace { -bool g_initializedEGL = false; -} - void* GLSurfaceQt::g_display = nullptr; void* GLSurfaceQt::g_config = nullptr; const char* GLSurfaceQt::g_extensions = nullptr; @@ -143,16 +129,9 @@ bool InitializeGLOneOffPlatform() if (GetGLImplementation() == kGLImplementationEGLGLES2 || GetGLImplementation() == kGLImplementationEGLANGLE) return GLSurfaceEGLQt::InitializeOneOff(); - if (GetGLImplementation() == kGLImplementationDesktopGL) { + if (GetGLImplementation() == kGLImplementationDesktopGL) return GLSurfaceWGLQt::InitializeOneOff(); - // Fallback to trying EGL with desktop GL. - if (GLSurfaceEGLQt::InitializeOneOff()) { - g_initializedEGL = true; - return true; - } - } - return false; } |