summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/eglnullws
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/gfxdrivers/eglnullws')
-rw-r--r--src/plugins/gfxdrivers/eglnullws/README48
-rw-r--r--src/plugins/gfxdrivers/eglnullws/eglnullws.pro18
-rw-r--r--src/plugins/gfxdrivers/eglnullws/eglnullwsscreen.cpp181
-rw-r--r--src/plugins/gfxdrivers/eglnullws/eglnullwsscreen.h69
-rw-r--r--src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.cpp66
-rw-r--r--src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.h47
-rw-r--r--src/plugins/gfxdrivers/eglnullws/eglnullwswindowsurface.cpp84
-rw-r--r--src/plugins/gfxdrivers/eglnullws/eglnullwswindowsurface.h63
8 files changed, 0 insertions, 576 deletions
diff --git a/src/plugins/gfxdrivers/eglnullws/README b/src/plugins/gfxdrivers/eglnullws/README
deleted file mode 100644
index 80b88c7e01..0000000000
--- a/src/plugins/gfxdrivers/eglnullws/README
+++ /dev/null
@@ -1,48 +0,0 @@
-EGL NullWS QScreen Driver
-=========================
-
-If your application draws everything within a single full-screen QGLWidget then
-you may wish to use this QScreen plugin driver. This driver simply returns 0
-(as a EGLNativeWindowType value) when asked by the QtOpenGl module to create a
-native window. Some OpenGL ES implementations (including PowerVR) interpret this
-to mean that a full-screen OpenGL context is desired without any windowing
-support (NullWS).
-
-To tell a Qt/Embedded application to use this driver use the -display command
-line option or the QWS_DISPLAY environment variable. The following driver
-options are supported:
-
-size=WIDTHxHEIGHT Screen size reported by the driver
-format=FORMAT Screen format
-
-Run with '-display eglnullws:help' to get a full list of options (including a
-list of supported format strings).
-
-If you choose a screen format that is not supported by the hardware then the
-QtOpenGl module will write out a list of supported EGL configurations. Use
-one of the supported screen formats from this list.
-
-Using this driver with PowerVR hardware
----------------------------------------
-
-Using this plugin with PowerVR hardware should give a significant speedup
-compared to running with the Qt powervr driver (with a full-screen QGLWidget).
-This is because sacrificing the window system allows less work to be done in
-order to get graphics on the screen. Using this driver also avoids the memory
-fragmentation issues present in the powervr driver and avoids any direct
-dependencies on the deprecated PVR2D API from Imagination Technologies.
-
-To use this driver ensure you have /etc/powervr.ini with contents similar to
-this:
-
-[default]
-WindowSystem=libpvrPVR2D_FLIPWSEGL.so
-
-This driver will also function with libpvrPVR2D_FRONTWSEGL.so, but that draws
-straight into the framebuffer and will therefore cause flickering (it can be
-useful for performance testing though). The flip plugin uses triple buffering,
-so you will need to set the virtual vertical resolution of your framebuffer to
-be three times the physical vertical resolution of your screen. This can be
-done with 'fbset -vyres'. Failure to do this can cause system crashes. You
-should also ensure that the plugin you choose in powervr.ini is in your library
-path (it may just silently default to the flip plugin if not).
diff --git a/src/plugins/gfxdrivers/eglnullws/eglnullws.pro b/src/plugins/gfxdrivers/eglnullws/eglnullws.pro
deleted file mode 100644
index 30cebab41a..0000000000
--- a/src/plugins/gfxdrivers/eglnullws/eglnullws.pro
+++ /dev/null
@@ -1,18 +0,0 @@
-TARGET = qeglnullws
-include(../../qpluginbase.pri)
-
-CONFIG += warn_on
-QT += opengl
-
-DESTDIR = $$QT.gui.plugins/gfxdrivers
-
-target.path = $$[QT_INSTALL_PLUGINS]/gfxdrivers
-INSTALLS += target
-
-HEADERS = eglnullwsscreen.h \
- eglnullwsscreenplugin.h \
- eglnullwswindowsurface.h
-
-SOURCES = eglnullwsscreen.cpp \
- eglnullwsscreenplugin.cpp \
- eglnullwswindowsurface.cpp
diff --git a/src/plugins/gfxdrivers/eglnullws/eglnullwsscreen.cpp b/src/plugins/gfxdrivers/eglnullws/eglnullwsscreen.cpp
deleted file mode 100644
index e8c73cf31d..0000000000
--- a/src/plugins/gfxdrivers/eglnullws/eglnullwsscreen.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "eglnullwsscreen.h"
-#include "eglnullwswindowsurface.h"
-#include "eglnullwsscreenplugin.h"
-
-#include <QHash>
-#include <QDebug>
-
-namespace
-{
- class EGLNullWSScreenSurfaceFunctions : public QGLScreenSurfaceFunctions
- {
- public:
- virtual bool createNativeWindow(QWidget *, EGLNativeWindowType *native)
- { *native = 0; return true; }
- };
-}
-
-EGLNullWSScreen::EGLNullWSScreen(int displayId) : QGLScreen(displayId) {}
-
-EGLNullWSScreen::~EGLNullWSScreen() {}
-
-bool EGLNullWSScreen::initDevice()
-{
- setSurfaceFunctions(new EGLNullWSScreenSurfaceFunctions);
- return true;
-}
-
-static const QHash<QString, QImage::Format> formatDictionary()
-{
- QHash<QString, QImage::Format> dictionary;
- dictionary["rgb32"] = QImage::Format_RGB32;
- dictionary["argb32"] = QImage::Format_ARGB32;
- dictionary["rgb16"] = QImage::Format_RGB16;
- dictionary["rgb666"] = QImage::Format_RGB666;
- dictionary["rgb555"] = QImage::Format_RGB555;
- dictionary["rgb888"] = QImage::Format_RGB888;
- dictionary["rgb444"] = QImage::Format_RGB444;
- return dictionary;
-}
-
-static int depthForFormat(QImage::Format format)
-{
- switch (format) {
- case QImage::Format_RGB32: return 32;
- case QImage::Format_ARGB32: return 32;
- case QImage::Format_RGB16: return 16;
- case QImage::Format_RGB666: return 24;
- case QImage::Format_RGB555: return 16;
- case QImage::Format_RGB888: return 24;
- case QImage::Format_RGB444: return 16;
- default:
- Q_ASSERT_X(false, "EGLNullWSScreen", "Unknown format");
- return -1;
- }
-}
-
-static void printHelp(const QHash<QString, QImage::Format> &formatDictionary)
-{
- QByteArray formatsBuf;
- QTextStream(&formatsBuf) << QStringList(formatDictionary.keys()).join(", ");
- qWarning(
- "%s: Valid options are:\n"
- "size=WIDTHxHEIGHT Screen size reported by this driver\n"
- "format=FORMAT Screen format, where FORMAT is one of the following:\n"
- " %s\n",
- PluginName,
- formatsBuf.constData());
-}
-
-bool EGLNullWSScreen::connect(const QString &displaySpec)
-{
- const QStringList args = displaySpec.section(':', 1).split(':', QString::SkipEmptyParts);
- const QHash<QString, QImage::Format> formatDict = formatDictionary();
- Q_FOREACH(const QString arg, args) {
- const QString optionName = arg.section('=', 0, 0);
- const QString optionArg = arg.section('=', 1);
- if (optionName == QLatin1String("size")) {
- w = optionArg.section('x', 0, 0).toInt();
- h = optionArg.section('x', 1, 1).toInt();
- } else if (optionName == QLatin1String("format")) {
- if (formatDict.contains(optionArg))
- setPixelFormat(formatDict.value(optionArg));
- else
- printHelp(formatDict);
- } else {
- printHelp(formatDict);
- }
- }
-
- if (w == 0 || h == 0) {
- w = 640;
- h = 480;
- qWarning("%s: Using default screen size %dx%d", PluginName, w, h);
- }
- dw = w;
- dh = h;
-
- if (pixelFormat() == QImage::Format_Invalid) {
- qWarning("%s: Using default screen format argb32", PluginName);
- setPixelFormat(QImage::Format_ARGB32);
- }
- d = depthForFormat(pixelFormat());
-
- static const int Dpi = 120;
- static const qreal ScalingFactor = static_cast<qreal>(25.4) / Dpi;
- physWidth = qRound(dw * ScalingFactor);
- physHeight = qRound(dh * ScalingFactor);
-
- return true;
-}
-
-void EGLNullWSScreen::disconnect() {}
-
-void EGLNullWSScreen::shutdownDevice() {}
-
-void EGLNullWSScreen::setMode(int /*width*/, int /*height*/, int /*depth*/) {}
-
-void EGLNullWSScreen::blank(bool /*on*/) {}
-
-void EGLNullWSScreen::exposeRegion(QRegion /*r*/, int /*changing*/) {}
-
-QWSWindowSurface* EGLNullWSScreen::createSurface(QWidget *widget) const
-{
- if (qobject_cast<QGLWidget*>(widget)) {
- return new EGLNullWSWindowSurface(widget);
- } else {
- qWarning("%s: Creating non-GL surface", PluginName);
- return QScreen::createSurface(widget);
- }
-}
-
-QWSWindowSurface* EGLNullWSScreen::createSurface(const QString &key) const
-{
- if (key == QLatin1String("eglnullws")) {
- return new EGLNullWSWindowSurface;
- } else {
- qWarning("%s: Creating non-GL surface", PluginName);
- return QScreen::createSurface(key);
- }
-}
diff --git a/src/plugins/gfxdrivers/eglnullws/eglnullwsscreen.h b/src/plugins/gfxdrivers/eglnullws/eglnullwsscreen.h
deleted file mode 100644
index 8295e5daaa..0000000000
--- a/src/plugins/gfxdrivers/eglnullws/eglnullwsscreen.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef EGLNULLWSSCREEN
-#define EGLNULLWSSCREEN
-
-#include <QGLScreen>
-
-class EGLNullWSScreen : public QGLScreen
-{
-public:
- EGLNullWSScreen(int displayId);
- ~EGLNullWSScreen();
-
- bool initDevice();
- bool connect(const QString &displaySpec);
- void disconnect();
- void shutdownDevice();
-
- void setMode(int width, int height, int depth);
- void blank(bool on);
-
- void exposeRegion(QRegion r, int changing);
-
- QWSWindowSurface* createSurface(QWidget *widget) const;
- QWSWindowSurface* createSurface(const QString &key) const;
-
- bool hasOpenGL() { return true; }
-};
-
-#endif // EGLNULLWSSCREEN
diff --git a/src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.cpp b/src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.cpp
deleted file mode 100644
index ebae53d8c4..0000000000
--- a/src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "eglnullwsscreenplugin.h"
-#include "eglnullwsscreen.h"
-
-#include <QScreenDriverPlugin>
-#include <QStringList>
-
-class EGLNullWSScreenPlugin : public QScreenDriverPlugin
-{
-public:
- virtual QStringList keys() const;
- virtual QScreen *create(const QString& driver, int displayId);
-};
-
-QStringList EGLNullWSScreenPlugin::keys() const
-{
- return QStringList() << QLatin1String(PluginName);
-}
-
-QScreen *EGLNullWSScreenPlugin::create(const QString& driver, int displayId)
-{
- return (driver.toLower() == QLatin1String(PluginName) ?
- new EGLNullWSScreen(displayId) : 0);
-}
-
-Q_EXPORT_PLUGIN2(qeglnullws, EGLNullWSScreenPlugin)
diff --git a/src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.h b/src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.h
deleted file mode 100644
index c0e5c2a524..0000000000
--- a/src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef EGLNULLWSSCREENPLUGIN_H
-#define EGLNULLWSSCREENPLUGIN_H
-
-const char *const PluginName = "eglnullws";
-
-#endif // EGLNULLWSSCREENPLUGIN_H
diff --git a/src/plugins/gfxdrivers/eglnullws/eglnullwswindowsurface.cpp b/src/plugins/gfxdrivers/eglnullws/eglnullwswindowsurface.cpp
deleted file mode 100644
index e5ac994a05..0000000000
--- a/src/plugins/gfxdrivers/eglnullws/eglnullwswindowsurface.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "eglnullwswindowsurface.h"
-#include "eglnullwsscreenplugin.h"
-
-#include <QGLWidget>
-
-static const QWSWindowSurface::SurfaceFlags Flags
- = QWSWindowSurface::RegionReserved | QWSWindowSurface::RegionReserved;
-
-EGLNullWSWindowSurface::EGLNullWSWindowSurface(QWidget *w)
- :
- QWSGLWindowSurface(w),
- widget(w)
-{
- setSurfaceFlags(Flags);
-}
-
-EGLNullWSWindowSurface::EGLNullWSWindowSurface()
- : widget(0)
-{
- setSurfaceFlags(Flags);
-}
-
-EGLNullWSWindowSurface::~EGLNullWSWindowSurface() {}
-
-QString EGLNullWSWindowSurface::key() const
-{
- return QLatin1String(PluginName);
-}
-
-QPaintDevice *EGLNullWSWindowSurface::paintDevice()
-{
- return widget;
-}
-
-bool EGLNullWSWindowSurface::isValid() const
-{
- return qobject_cast<QGLWidget *>(window());
-}
-
-QImage EGLNullWSWindowSurface::image() const
-{
- return QImage();
-}
diff --git a/src/plugins/gfxdrivers/eglnullws/eglnullwswindowsurface.h b/src/plugins/gfxdrivers/eglnullws/eglnullwswindowsurface.h
deleted file mode 100644
index bdb1d42d7e..0000000000
--- a/src/plugins/gfxdrivers/eglnullws/eglnullwswindowsurface.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef EGLNULLWSWINDOWSURFACE_H
-#define EGLNULLWSWINDOWSURFACE_H
-
-#include <private/qglwindowsurface_qws_p.h>
-
-class EGLNullWSWindowSurface : public QWSGLWindowSurface
-{
-public:
- EGLNullWSWindowSurface(QWidget *widget);
- EGLNullWSWindowSurface();
- virtual ~EGLNullWSWindowSurface();
-
- virtual QString key() const;
- virtual QPaintDevice *paintDevice();
- virtual bool isValid() const;
- virtual QImage image() const;
-
-private:
- QWidget *widget;
-};
-
-#endif // EGLNULLWSWINDOWSURFACE_H