diff -r b72c6db6890b -r 5dc02b23752f src/gui/egl/qegl_symbian.cpp --- a/src/gui/egl/qegl_symbian.cpp Wed Jun 23 19:07:03 2010 +0300 +++ b/src/gui/egl/qegl_symbian.cpp Tue Jul 06 15:10:48 2010 +0300 @@ -42,48 +42,28 @@ #include #include #include + #include "qegl_p.h" +#include "qeglcontext_p.h" #include QT_BEGIN_NAMESPACE -EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties) +EGLNativeDisplayType QEgl::nativeDisplay() +{ + return EGL_DEFAULT_DISPLAY; +} + +EGLNativeWindowType QEgl::nativeWindow(QWidget* widget) { - // Create the native drawable for the paint device. - int devType = device->devType(); - EGLNativePixmapType pixmapDrawable = 0; - EGLNativeWindowType windowDrawable = 0; - bool ok; - if (devType == QInternal::Pixmap) { - pixmapDrawable = 0; - ok = (pixmapDrawable != 0); - } else if (devType == QInternal::Widget) { - QWidget *w = static_cast(device); - windowDrawable = (EGLNativeWindowType)(w->winId()->DrawableWindow()); - ok = (windowDrawable != 0); - } else { - ok = false; - } - if (!ok) { - qWarning("QEglContext::createSurface(): Cannot create the native EGL drawable"); - return EGL_NO_SURFACE; - } + return (EGLNativeWindowType)(widget->winId()->DrawableWindow()); +} - // Create the EGL surface to draw into, based on the native drawable. - const int *props; - if (properties) - props = properties->properties(); - else - props = 0; - EGLSurface surf; - if (devType == QInternal::Widget) - surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, props); - else - surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, props); - if (surf == EGL_NO_SURFACE) - qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError()); - return surf; +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. @@ -96,7 +76,7 @@ if (devType == QInternal::Image) setPixelFormat(static_cast(dev)->format()); else - setPixelFormat(QImage::Format_ARGB32); + setPixelFormat(QImage::Format_RGB32); }