diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-06 15:35:28 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-06 15:41:25 +0200 |
commit | 1f0299b029eadc988872dc6b0bc27e78a625c871 (patch) | |
tree | a2bbdad506af8865f9117e13451af7a542a1cb9e /src/plugins/platforms/openwfd/qopenwfdglcontext.cpp | |
parent | cd75446c1e6e9ce17f9bb536af97775ad62aef1a (diff) |
Remove OpenWFD platform plugin
It was added in 2011 and has not seen any development since, and was
never included in the build system.
The OpenWFD use-case is covered by EGLFS, which has a dedicated
OpenWFD backend.
Change-Id: Id08c505e2d869a96255163cae2ede51b9efeb73f
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/plugins/platforms/openwfd/qopenwfdglcontext.cpp')
-rw-r--r-- | src/plugins/platforms/openwfd/qopenwfdglcontext.cpp | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/src/plugins/platforms/openwfd/qopenwfdglcontext.cpp b/src/plugins/platforms/openwfd/qopenwfdglcontext.cpp deleted file mode 100644 index cf267ea203..0000000000 --- a/src/plugins/platforms/openwfd/qopenwfdglcontext.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://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.LGPL3 included in the -** 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-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qopenwfdglcontext.h" - -#include "qopenwfdwindow.h" -#include "qopenwfdscreen.h" -#include <dlfcn.h> - -QOpenWFDGLContext::QOpenWFDGLContext(QOpenWFDDevice *device) - : QPlatformOpenGLContext() - , mWfdDevice(device) -{ -} - -QSurfaceFormat QOpenWFDGLContext::format() const -{ - return QSurfaceFormat(); -} - -bool QOpenWFDGLContext::makeCurrent(QPlatformSurface *surface) -{ - Q_ASSERT(surface->surface()->surfaceType() == QSurface::OpenGLSurface); - - EGLDisplay display = mWfdDevice->eglDisplay(); - EGLContext context = mWfdDevice->eglContext(); - if (!eglMakeCurrent(display,EGL_NO_SURFACE,EGL_NO_SURFACE,context)) { - qDebug("GLContext: eglMakeCurrent FAILED!"); - } - - QPlatformWindow *window = static_cast<QPlatformWindow *>(surface); - QOpenWFDScreen *screen = static_cast<QOpenWFDScreen *>(QPlatformScreen::platformScreenForWindow(window->window())); - screen->bindFramebuffer(); - return true; -} - -void QOpenWFDGLContext::doneCurrent() -{ - //do nothing :) -} - -void QOpenWFDGLContext::swapBuffers(QPlatformSurface *surface) -{ - glFlush(); - - QPlatformWindow *window = static_cast<QPlatformWindow *>(surface); - QOpenWFDScreen *screen = static_cast<QOpenWFDScreen *>(QPlatformScreen::platformScreenForWindow(window->window())); - - screen->swapBuffers(); -} - -QFunctionPointer QOpenWFDGLContext::getProcAddress(const char *procName) -{ - QFunctionPointer proc = (QFunctionPointer) eglGetProcAddress(procName); - if (!proc) - proc = (QFunctionPointer) dlsym(RTLD_DEFAULT, procName); - return proc; -} - -EGLContext QOpenWFDGLContext::eglContext() const -{ - return mWfdDevice->eglContext(); -} - - |