summaryrefslogtreecommitdiffstats
path: root/src/gui/egl/qegl_wince.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-02-12 14:50:49 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-02-12 16:03:16 (GMT)
commitaf1f28a0d78deee31c5df0d7d042ae7671c8c34c (patch)
treee42d9effcddda6289afbeb4d9817db68467ce308 /src/gui/egl/qegl_wince.cpp
parent040151b51780084f3a2b764bab7e2359677eb0b1 (diff)
downloadQt-af1f28a0d78deee31c5df0d7d042ae7671c8c34c.zip
Qt-af1f28a0d78deee31c5df0d7d042ae7671c8c34c.tar.gz
Qt-af1f28a0d78deee31c5df0d7d042ae7671c8c34c.tar.bz2
Cleanup QEglContext & EGLDisplays
This basicaly replaces display(), openDisplay() & defaultDisplay() methods with a single display() and nativeDisplay(), the latter being implemented in the platform-specific files and everything else being cross-platform code. Reviewed-By: Trond
Diffstat (limited to 'src/gui/egl/qegl_wince.cpp')
-rw-r--r--src/gui/egl/qegl_wince.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/gui/egl/qegl_wince.cpp b/src/gui/egl/qegl_wince.cpp
index 026a7b1..c9c9773 100644
--- a/src/gui/egl/qegl_wince.cpp
+++ b/src/gui/egl/qegl_wince.cpp
@@ -87,20 +87,15 @@ EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties
return surf;
}
-EGLDisplay QEglContext::getDisplay(QPaintDevice *device)
+EGLNativeDisplayType QEglContext::nativeDisplay()
{
- EGLDisplay dpy = 0;
HWND win = (static_cast<QWidget*>(device))->winId();
HDC myDc = GetDC(win);
if (!myDc) {
- qWarning("QEglContext::defaultDisplay(): WinCE display is not open");
+ qWarning("QEglContext::nativeDisplay(): WinCE display is not open");
+ return EGL_DEFAULT_DISPLAY;
}
- dpy = eglGetDisplay(EGLNativeDisplayType(myDc));
- if (dpy == EGL_NO_DISPLAY) {
- qWarning("QEglContext::defaultDisplay(): Falling back to EGL_DEFAULT_DISPLAY");
- dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY);
- }
- return dpy;
+ return EGLNativeDisplayType(myDc);
}
// Set pixel format and other properties based on a paint device.