diff options
Diffstat (limited to 'src/core/gl_surface_qt.cpp')
-rw-r--r-- | src/core/gl_surface_qt.cpp | 48 |
1 files changed, 15 insertions, 33 deletions
diff --git a/src/core/gl_surface_qt.cpp b/src/core/gl_surface_qt.cpp index bc1b8b399..4fe2f2137 100644 --- a/src/core/gl_surface_qt.cpp +++ b/src/core/gl_surface_qt.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtWebEngine module of the Qt Toolkit. ** @@ -10,15 +10,15 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to +** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** @@ -26,7 +26,7 @@ ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to +** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** @@ -69,6 +69,12 @@ extern "C" { #include "ui/gl/gl_context_wgl.h" #endif +// 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 + using ui::GetLastEGLErrorString; namespace gfx { @@ -92,7 +98,6 @@ public: virtual bool Initialize() Q_DECL_OVERRIDE; virtual void Destroy() Q_DECL_OVERRIDE; virtual void* GetHandle() Q_DECL_OVERRIDE; - virtual void* GetShareHandle() Q_DECL_OVERRIDE; virtual bool Resize(const gfx::Size &size) Q_DECL_OVERRIDE; protected: @@ -357,12 +362,13 @@ bool GLSurface::InitializeOneOffInternal() if (GetGLImplementation() == kGLImplementationEGLGLES2) return GLSurfaceQtEGL::InitializeOneOff(); - if (GetGLImplementation() == kGLImplementationDesktopGL) + if (GetGLImplementation() == kGLImplementationDesktopGL) { #if defined(USE_X11) return GLSurfaceQtGLX::InitializeOneOff(); #elif defined(OS_WIN) return GLSurfaceQtWGL::InitializeOneOff(); #endif + } return false; } @@ -483,30 +489,6 @@ void* GLSurfaceQtEGL::GetHandle() return reinterpret_cast<void*>(m_surfaceBuffer); } -void* GLSurfaceQtEGL::GetShareHandle() -{ -#if defined(OS_ANDROID) - Q_UNREACHABLE(); - return NULL; -#else - if (!gfx::g_driver_egl.ext.b_EGL_ANGLE_query_surface_pointer) - return NULL; - - if (!gfx::g_driver_egl.ext.b_EGL_ANGLE_surface_d3d_texture_2d_share_handle) - return NULL; - - void* handle; - if (!eglQuerySurfacePointerANGLE(g_display, - GetHandle(), - EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE, - &handle)) { - return NULL; - } - - return handle; -#endif -} - void* GLSurfaceQt::GetDisplay() { return g_display; |