summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.cpp
diff options
context:
space:
mode:
authorJames Perrett <james.perrett@tandberg.com>2010-07-08 13:06:10 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-07-08 13:06:10 (GMT)
commitc4179a0e29dab5034c1980622df88a05724706e4 (patch)
tree581a816ab6d7995dec9425293fe5ee6876d42963 /src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.cpp
parent165d5f93ef75f8f4a1bbaeab1f3b3c6825819b0e (diff)
downloadQt-c4179a0e29dab5034c1980622df88a05724706e4.zip
Qt-c4179a0e29dab5034c1980622df88a05724706e4.tar.gz
Qt-c4179a0e29dab5034c1980622df88a05724706e4.tar.bz2
Add eglnullws QScreen driver
This QScreen driver can be used for embedded Qt applications that draw everything within a single full-screen QGLWidget. It uses underlying support for a null window system (NullWS) such as is present in PowerVR systems. It offers performance and stability improvements over the powervr QScreen driver for applications that do not need full QWS windowing support. Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.cpp')
-rw-r--r--src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.cpp b/src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.cpp
new file mode 100644
index 0000000..354ddef
--- /dev/null
+++ b/src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.cpp
@@ -0,0 +1,25 @@
+#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)