summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-23 13:53:18 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-23 13:53:18 (GMT)
commitbdb60cb602798a73eef3837c577797791b6c8a00 (patch)
tree295a82e1196ca2a37e50d7f73f928f1ef881eebf /src/gui
parent31ce7ae7c7dcf2349b3af5f9b5ec8cd746d62dd7 (diff)
parentf540b740cfbc4a90f615814cdf2142b1073d352a (diff)
downloadQt-bdb60cb602798a73eef3837c577797791b6c8a00.zip
Qt-bdb60cb602798a73eef3837c577797791b6c8a00.tar.gz
Qt-bdb60cb602798a73eef3837c577797791b6c8a00.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: stub implementations for EGL for symbian
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/egl/egl.pri41
-rw-r--r--src/gui/egl/qegl_stub.cpp238
-rw-r--r--src/gui/egl/qeglproperties_p.h21
-rw-r--r--src/gui/egl/qeglproperties_stub.cpp138
-rw-r--r--src/gui/gui.pro2
5 files changed, 420 insertions, 20 deletions
diff --git a/src/gui/egl/egl.pri b/src/gui/egl/egl.pri
index 669d311..65b1636 100644
--- a/src/gui/egl/egl.pri
+++ b/src/gui/egl/egl.pri
@@ -1,23 +1,28 @@
-CONFIG += egl
+contains(QT_CONFIG, egl): {
+ CONFIG += egl
-HEADERS += \
- egl/qegl_p.h \
- egl/qeglproperties_p.h
+ HEADERS += \
+ egl/qegl_p.h \
+ egl/qeglproperties_p.h
-SOURCES += \
- egl/qegl.cpp \
- egl/qeglproperties.cpp
+ SOURCES += \
+ egl/qegl.cpp \
+ egl/qeglproperties.cpp
-wince*: SOURCES += egl/qegl_wince.cpp
+ wince*: SOURCES += egl/qegl_wince.cpp
-unix {
- embedded {
- SOURCES += egl/qegl_qws.cpp
- } else {
- symbian {
- SOURCES += egl/qegl_symbian.cpp
- } else {
- SOURCES += egl/qegl_x11.cpp
- }
- }
+ unix {
+ embedded {
+ SOURCES += egl/qegl_qws.cpp
+ } else {
+ symbian {
+ SOURCES += egl/qegl_symbian.cpp
+ } else {
+ SOURCES += egl/qegl_x11.cpp
+ }
+ }
+ }
+} else:symbian {
+ SOURCES += egl/qegl_stub.cpp
+ SOURCES += egl/qeglproperties_stub.cpp
}
diff --git a/src/gui/egl/qegl_stub.cpp b/src/gui/egl/qegl_stub.cpp
new file mode 100644
index 0000000..e280739
--- /dev/null
+++ b/src/gui/egl/qegl_stub.cpp
@@ -0,0 +1,238 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, 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.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qpaintdevice.h>
+#include <QtGui/qpixmap.h>
+#include <QtGui/qwidget.h>
+#include <QtCore/qdebug.h>
+
+#include "qegl_p.h"
+
+QT_BEGIN_NAMESPACE
+
+static void noegl(const char *fn)
+{
+ qWarning() << fn << " called, but Qt configured without EGL" << endl;
+}
+
+#define NOEGL noegl(__FUNCTION__);
+
+EGLDisplay QEglContext::dpy = 0;
+
+QEglContext::QEglContext()
+ : apiType(QEgl::OpenGL)
+ , ctx(0)
+ , cfg(0)
+ , currentSurface(0)
+ , current(false)
+ , ownsContext(true)
+ , sharing(false)
+{
+ NOEGL
+}
+
+QEglContext::~QEglContext()
+{
+ NOEGL
+}
+
+bool QEglContext::isValid() const
+{
+ NOEGL
+ return false;
+}
+
+bool QEglContext::isCurrent() const
+{
+ NOEGL
+ return false;
+}
+
+bool QEglContext::chooseConfig(const QEglProperties& properties, QEgl::PixelFormatMatch match)
+{
+ Q_UNUSED(properties)
+ Q_UNUSED(match)
+ NOEGL
+ return false;
+}
+
+EGLSurface QEglContext::createSurface(QPaintDevice* device, const QEglProperties *properties)
+{
+ Q_UNUSED(device)
+ Q_UNUSED(properties)
+ NOEGL
+ return 0;
+}
+
+
+// Create the EGLContext.
+bool QEglContext::createContext(QEglContext *shareContext, const QEglProperties *properties)
+{
+ Q_UNUSED(shareContext)
+ Q_UNUSED(properties)
+ NOEGL
+ return false;
+}
+
+// Destroy an EGL surface object. If it was current on this context
+// then call doneCurrent() for it first.
+void QEglContext::destroySurface(EGLSurface surface)
+{
+ Q_UNUSED(surface)
+ NOEGL
+}
+
+// Destroy the context. Note: this does not destroy the surface.
+void QEglContext::destroyContext()
+{
+ NOEGL
+}
+
+bool QEglContext::makeCurrent(EGLSurface surface)
+{
+ Q_UNUSED(surface)
+ NOEGL
+ return false;
+}
+
+bool QEglContext::doneCurrent()
+{
+ NOEGL
+ return false;
+}
+
+// Act as though doneCurrent() was called, but keep the context
+// and the surface active for the moment. This allows makeCurrent()
+// to skip a call to eglMakeCurrent() if we are using the same
+// surface as the last set of painting operations. We leave the
+// currentContext() pointer as-is for now.
+bool QEglContext::lazyDoneCurrent()
+{
+ NOEGL
+ return false;
+}
+
+bool QEglContext::swapBuffers(EGLSurface surface)
+{
+ Q_UNUSED(surface)
+ NOEGL
+ return false;
+}
+
+bool QEglContext::configAttrib(int name, EGLint *value) const
+{
+ Q_UNUSED(name)
+ Q_UNUSED(value)
+ NOEGL
+ return false;
+}
+
+EGLDisplay QEglContext::display()
+{
+ NOEGL
+ return 0;
+}
+
+// Return the error string associated with a specific code.
+QString QEglContext::errorString(EGLint code)
+{
+ Q_UNUSED(code)
+ NOEGL
+ return QString();
+}
+
+// Dump all of the EGL configurations supported by the system.
+void QEglContext::dumpAllConfigs()
+{
+ NOEGL
+}
+
+QString QEglContext::extensions()
+{
+ NOEGL
+ return QString();
+}
+
+bool QEglContext::hasExtension(const char* extensionName)
+{
+ Q_UNUSED(extensionName)
+ NOEGL
+ return false;
+}
+
+QEglContext *QEglContext::currentContext(QEgl::API api)
+{
+ Q_UNUSED(api)
+ NOEGL
+ return false;
+}
+
+void QEglContext::setCurrentContext(QEgl::API api, QEglContext *context)
+{
+ Q_UNUSED(api)
+ Q_UNUSED(context)
+ NOEGL
+}
+
+EGLNativeDisplayType QEglContext::nativeDisplay()
+{
+ NOEGL
+ return 0;
+}
+
+void QEglContext::waitClient()
+{
+ NOEGL
+}
+
+void QEglContext::waitNative()
+{
+ NOEGL
+}
+
+QEglProperties QEglContext::configProperties(EGLConfig cfg) const
+{
+ Q_UNUSED(cfg)
+ NOEGL
+ return QEglProperties();
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/egl/qeglproperties_p.h b/src/gui/egl/qeglproperties_p.h
index 43c3393..b385773 100644
--- a/src/gui/egl/qeglproperties_p.h
+++ b/src/gui/egl/qeglproperties_p.h
@@ -58,6 +58,7 @@
QT_BEGIN_INCLUDE_NAMESPACE
+#ifndef QT_NO_EGL
#if defined(QT_OPENGL_ES_2)
# include <GLES2/gl2.h>
#endif
@@ -67,6 +68,24 @@ QT_BEGIN_INCLUDE_NAMESPACE
#else
# include <EGL/egl.h>
#endif
+#else
+
+//types from egltypes.h for compiling stub without EGL headers
+typedef int EGLBoolean;
+typedef int EGLint;
+typedef int EGLenum;
+typedef int NativeDisplayType;
+typedef void* NativeWindowType;
+typedef void* NativePixmapType;
+typedef int EGLDisplay;
+typedef int EGLConfig;
+typedef int EGLSurface;
+typedef int EGLContext;
+typedef int EGLClientBuffer;
+#define EGL_NONE 0x3038 /* Attrib list terminator */
+
+#endif
+
#if defined(Q_WS_X11)
@@ -103,7 +122,7 @@ namespace QEgl {
ExactPixelFormat,
BestPixelFormat
};
-};
+}
class QX11Info;
class QPaintDevice;
diff --git a/src/gui/egl/qeglproperties_stub.cpp b/src/gui/egl/qeglproperties_stub.cpp
new file mode 100644
index 0000000..bf5e47b
--- /dev/null
+++ b/src/gui/egl/qeglproperties_stub.cpp
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, 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.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qdebug.h>
+#include <QtCore/qstringlist.h>
+
+#include "qeglproperties_p.h"
+
+QT_BEGIN_NAMESPACE
+
+static void noegl(const char *fn)
+{
+ qWarning() << fn << " called, but Qt configured without EGL" << endl;
+}
+
+#define NOEGL noegl(__FUNCTION__);
+
+// Initialize a property block.
+QEglProperties::QEglProperties()
+{
+ NOEGL
+}
+
+QEglProperties::QEglProperties(EGLConfig cfg)
+{
+ Q_UNUSED(cfg)
+ NOEGL
+}
+
+// Fetch the current value associated with a property.
+int QEglProperties::value(int name) const
+{
+ Q_UNUSED(name)
+ NOEGL
+ return 0;
+}
+
+// Set the value associated with a property, replacing an existing
+// value if there is one.
+void QEglProperties::setValue(int name, int value)
+{
+ Q_UNUSED(name)
+ Q_UNUSED(value)
+ NOEGL
+}
+
+// Remove a property value. Returns false if the property is not present.
+bool QEglProperties::removeValue(int name)
+{
+ Q_UNUSED(name)
+ NOEGL
+ return false;
+}
+
+// Sets the red, green, blue, and alpha sizes based on a pixel format.
+// Normally used to match a configuration request to the screen format.
+void QEglProperties::setPixelFormat(QImage::Format pixelFormat)
+{
+ Q_UNUSED(pixelFormat)
+ NOEGL
+
+}
+
+void QEglProperties::setRenderableType(QEgl::API api)
+{
+ Q_UNUSED(api);
+ NOEGL
+}
+
+// Reduce the complexity of a configuration request to ask for less
+// because the previous request did not result in success. Returns
+// true if the complexity was reduced, or false if no further
+// reductions in complexity are possible.
+bool QEglProperties::reduceConfiguration()
+{
+ NOEGL
+ return false;
+}
+
+// Convert a property list to a string suitable for debug output.
+QString QEglProperties::toString() const
+{
+ NOEGL
+ return QString();
+}
+
+void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev)
+{
+ Q_UNUSED(dev)
+ NOEGL
+}
+
+void QEglProperties::dumpAllConfigs()
+{
+ NOEGL
+}
+
+QT_END_NAMESPACE
+
+
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index d2401f4..8b58835 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -40,7 +40,7 @@ include(statemachine/statemachine.pri)
include(math3d/math3d.pri)
include(effects/effects.pri)
-contains(QT_CONFIG, egl): include(egl/egl.pri)
+include(egl/egl.pri)
embedded: QT += network