summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-03-02 12:42:05 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-03-02 12:44:16 (GMT)
commita140e37fab6a1d028fd1b751a98774dacb4f1a89 (patch)
tree24adfa7090f4b071e53703609bace8e75d047dc7 /src/gui
parent3708ff474a987ddb82f7b66d8c686f499b65eeb6 (diff)
downloadQt-a140e37fab6a1d028fd1b751a98774dacb4f1a89.zip
Qt-a140e37fab6a1d028fd1b751a98774dacb4f1a89.tar.gz
Qt-a140e37fab6a1d028fd1b751a98774dacb4f1a89.tar.bz2
Fix & move QEgl::native* to platform-specific files
This should fix build on Symbian & WinCE Reviewed-By: TrustMe
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/egl/qegl.cpp19
-rw-r--r--src/gui/egl/qegl_qws.cpp17
-rw-r--r--src/gui/egl/qegl_symbian.cpp11
-rw-r--r--src/gui/egl/qegl_wince.cpp11
-rw-r--r--src/gui/egl/qegl_x11.cpp11
5 files changed, 49 insertions, 20 deletions
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp
index 1bfba10..485bfbf 100644
--- a/src/gui/egl/qegl.cpp
+++ b/src/gui/egl/qegl.cpp
@@ -549,25 +549,6 @@ EGLDisplay QEgl::display()
return dpy;
}
-#if !defined(Q_WS_X11) && !defined(Q_WS_WINCE) // WinCE & X11 implement this properly
-EGLNativeDisplayType QEgl::nativeDisplay()
-{
- return EGL_DEFAULT_DISPLAY;
-}
-#endif
-
-#if !defined(Q_OS_SYMBIAN)
-EGLNativeWindowType QEgl::nativeWindow(QWidget* widget)
-{
- return (EGLNativeWindowType)(widget->winId());
-}
-#endif
-
-EGLNativePixmapType QEgl::nativePixmap(QPixmap* pixmap)
-{
- return (EGLNativePixmapType)(pixmap->handle());
-}
-
#ifndef Q_WS_X11
EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *properties)
{
diff --git a/src/gui/egl/qegl_qws.cpp b/src/gui/egl/qegl_qws.cpp
index eb41bcc..56383a5 100644
--- a/src/gui/egl/qegl_qws.cpp
+++ b/src/gui/egl/qegl_qws.cpp
@@ -92,6 +92,23 @@ void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev)
setPixelFormat(screen->pixelFormat());
}
+EGLNativeDisplayType QEgl::nativeDisplay()
+{
+ return EGL_DEFAULT_DISPLAY;
+}
+
+EGLNativeWindowType QEgl::nativeWindow(QWidget* widget)
+{
+ return (EGLNativeWindowType)(widget->winId()); // Might work
+}
+
+EGLNativePixmapType QEgl::nativePixmap(QPixmap*)
+{
+ qWarning("QEgl: EGL pixmap surfaces not supported on QWS");
+ return (EGLNativePixmapType)0;
+}
+
+
QT_END_NAMESPACE
#endif // !QT_NO_EGL
diff --git a/src/gui/egl/qegl_symbian.cpp b/src/gui/egl/qegl_symbian.cpp
index 8833b42..9744ed0 100644
--- a/src/gui/egl/qegl_symbian.cpp
+++ b/src/gui/egl/qegl_symbian.cpp
@@ -50,11 +50,22 @@
QT_BEGIN_NAMESPACE
+EGLNativeDisplayType QEgl::nativeDisplay()
+{
+ return EGL_DEFAULT_DISPLAY;
+}
+
EGLNativeWindowType QEgl::nativeWindow(QWidget* widget)
{
return (EGLNativeWindowType)(widget->winId()->DrawableWindow());
}
+EGLNativePixmapType QEgl::nativePixmap(QPixmap*)
+{
+ qWarning("QEgl: EGL pixmap surfaces not implemented yet on Symbian");
+ return (EGLNativePixmapType)0;
+}
+
// Set pixel format and other properties based on a paint device.
void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev)
{
diff --git a/src/gui/egl/qegl_wince.cpp b/src/gui/egl/qegl_wince.cpp
index b201153..c07b20b 100644
--- a/src/gui/egl/qegl_wince.cpp
+++ b/src/gui/egl/qegl_wince.cpp
@@ -62,6 +62,17 @@ EGLNativeDisplayType QEgl::nativeDisplay()
return EGLNativeDisplayType(myDc);
}
+EGLNativeWindowType QEgl::nativeWindow(QWidget* widget)
+{
+ return (EGLNativeWindowType)(widget->winId());
+}
+
+EGLNativePixmapType QEgl::nativePixmap(QPixmap*)
+{
+ qWarning("QEgl: EGL pixmap surfaces not supported on WinCE");
+ return (EGLNativePixmapType)0;
+}
+
// Set pixel format and other properties based on a paint device.
void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev)
{
diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp
index a4bfcac..339bd57 100644
--- a/src/gui/egl/qegl_x11.cpp
+++ b/src/gui/egl/qegl_x11.cpp
@@ -67,6 +67,16 @@ EGLNativeDisplayType QEgl::nativeDisplay()
return EGLNativeDisplayType(xdpy);
}
+EGLNativeWindowType QEgl::nativeWindow(QWidget* widget)
+{
+ return (EGLNativeWindowType)(widget->winId());
+}
+
+EGLNativePixmapType QEgl::nativePixmap(QPixmap* pixmap)
+{
+ return (EGLNativePixmapType)(pixmap->handle());
+}
+
static int countBits(unsigned long mask)
{
int count = 0;
@@ -399,5 +409,4 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg
return EGL_NO_SURFACE;
}
-
QT_END_NAMESPACE