summaryrefslogtreecommitdiffstats
path: root/src/core/ozone/gl_surface_egl_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ozone/gl_surface_egl_qt.cpp')
-rw-r--r--src/core/ozone/gl_surface_egl_qt.cpp87
1 files changed, 4 insertions, 83 deletions
diff --git a/src/core/ozone/gl_surface_egl_qt.cpp b/src/core/ozone/gl_surface_egl_qt.cpp
index 7f00ea6ed..a0c120ac6 100644
--- a/src/core/ozone/gl_surface_egl_qt.cpp
+++ b/src/core/ozone/gl_surface_egl_qt.cpp
@@ -12,79 +12,14 @@
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_display.h"
#include "ui/gl/gl_display_manager.h"
-#include "ui/gl/gl_surface_egl.h"
#include "ui/gl/init/gl_factory.h"
-#if !BUILDFLAG(IS_MAC)
-// From ANGLE's egl/eglext.h.
-#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle
-#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
-#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200
-#endif
+#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN)
using ui::GetLastEGLErrorString;
namespace gl {
-bool GLDisplayEGL::InitializeExtensionSettings()
-{
- return GLSurfaceEGLQt::InitializeExtensionSettingsOneOff();
-}
-
-GLDisplayEGL *GLDisplayEGL::GetDisplayForCurrentContext()
-{
- GLContext *context = GLContext::GetCurrent();
- return context ? context->GetGLDisplayEGL() : nullptr;
-}
-
-bool GLDisplayEGL::IsEGLSurfacelessContextSupported()
-{
- return GLSurfaceEGLQt::g_egl_surfaceless_context_supported;
-}
-
-bool GLDisplayEGL::IsEGLContextPrioritySupported()
-{
- return false;
-}
-
-bool GLDisplayEGL::Initialize(gl::EGLDisplayPlatform native_display)
-{
- auto glDisplay = GLSurfaceEGLQt::InitializeOneOff(0);
-
- if (glDisplay) {
- display_ = glDisplay->GetDisplay();
- native_display_ = native_display;
- }
-
- return glDisplay;
-}
-
-bool GLDisplayEGL::IsAndroidNativeFenceSyncSupported()
-{
- return false;
-}
-
-// static
-GLDisplayEGL *GLSurfaceEGL::GetGLDisplayEGL()
-{
- return GLDisplayManagerEGL::GetInstance()->GetDisplay(GpuPreference::kDefault);
-}
-
-DisplayType GLDisplayEGL::GetDisplayType() const
-{
- return DisplayType::DEFAULT;
-}
-
-EGLDisplayPlatform GLDisplayEGL::GetNativeDisplay() const
-{
- return native_display_;
-}
-
-GLSurface *GLSurfaceEGL::createSurfaceless(gl::GLDisplayEGL *display, const gfx::Size& size)
-{
- return new GLSurfacelessQtEGL(display, size);
-}
-
bool GLSurfaceEGLQt::g_egl_surfaceless_context_supported = false;
bool GLSurfaceEGLQt::s_initialized = false;
@@ -99,12 +34,12 @@ GLSurfaceEGLQt::~GLSurfaceEGLQt()
Destroy();
}
-gl::GLDisplay *GLSurfaceEGLQt::InitializeOneOff(uint64_t system_device_id)
+gl::GLDisplay *GLSurfaceEGLQt::InitializeOneOff(gl::GpuPreference preference)
{
if (s_initialized)
return g_display;
- auto *egl_display = GLDisplayManagerEGL::GetInstance()->GetDisplay(system_device_id);
+ auto *egl_display = GLDisplayManagerEGL::GetInstance()->GetDisplay(preference);
g_display = egl_display;
egl_display->SetDisplay(GLContextHelper::getEGLDisplay());
if (!egl_display->GetDisplay()) {
@@ -123,7 +58,6 @@ gl::GLDisplay *GLSurfaceEGLQt::InitializeOneOff(uint64_t system_device_id)
return nullptr;
}
- g_client_extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
g_extensions = eglQueryString(egl_display->GetDisplay(), EGL_EXTENSIONS);
g_egl_surfaceless_context_supported = ExtensionsContain(g_extensions.c_str(), "EGL_KHR_surfaceless_context");
if (g_egl_surfaceless_context_supported) {
@@ -261,17 +195,4 @@ void* GLSurfacelessQtEGL::GetShareHandle()
}
} // namespace gl
-#endif // !BUILDFLAG(IS_MAC)
-
-namespace gl {
-
-std::string DisplayExtensionsEGL::GetPlatformExtensions(void*)
-{
- EGLDisplay display = GLContextHelper::getEGLDisplay();
- if (display == EGL_NO_DISPLAY)
- return "";
-
- const char* str = eglQueryString(display, EGL_EXTENSIONS);
- return str ? std::string(str) : "";
-}
-} // namespace gl
+#endif // !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN)