summaryrefslogtreecommitdiffstats
path: root/src/gui/egl
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-03-01 11:59:34 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-03-02 08:24:25 (GMT)
commitf936cc4e2a7b377981a626b1d45dbbb1c1df1cb8 (patch)
tree2947cac05c037279c92563d99f1362c141760e7a /src/gui/egl
parenta2eddea1432d6e558dcd620cd5100ce4531975e8 (diff)
downloadQt-f936cc4e2a7b377981a626b1d45dbbb1c1df1cb8.zip
Qt-f936cc4e2a7b377981a626b1d45dbbb1c1df1cb8.tar.gz
Qt-f936cc4e2a7b377981a626b1d45dbbb1c1df1cb8.tar.bz2
Move EGL surface type setting to new QEglProperties::setDeviceType
Also renamed qt_egl_set_format->qt_eglproperties_set_glformat Reviewed-By: TrustMe
Diffstat (limited to 'src/gui/egl')
-rw-r--r--src/gui/egl/qeglproperties.cpp11
-rw-r--r--src/gui/egl/qeglproperties_p.h4
2 files changed, 13 insertions, 2 deletions
diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp
index e0e8481..636f469 100644
--- a/src/gui/egl/qeglproperties.cpp
+++ b/src/gui/egl/qeglproperties.cpp
@@ -167,6 +167,17 @@ bool QEglProperties::removeValue(int name)
return false;
}
+void QEglProperties::setDeviceType(int devType)
+{
+ if (devType == QInternal::Pixmap || devType == QInternal::Image)
+ setValue(EGL_SURFACE_TYPE, EGL_PIXMAP_BIT);
+ else if (devType == QInternal::Pbuffer)
+ setValue(EGL_SURFACE_TYPE, EGL_PBUFFER_BIT);
+ else
+ setValue(EGL_SURFACE_TYPE, EGL_WINDOW_BIT);
+}
+
+
// 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)
diff --git a/src/gui/egl/qeglproperties_p.h b/src/gui/egl/qeglproperties_p.h
index 496847b..eebcf72 100644
--- a/src/gui/egl/qeglproperties_p.h
+++ b/src/gui/egl/qeglproperties_p.h
@@ -82,9 +82,9 @@ public:
#ifdef Q_WS_X11
void setVisualFormat(const QX11Info *xinfo);
#endif
- void setRenderableType(QEgl::API api);
-
+ void setDeviceType(int devType);
void setPaintDeviceFormat(QPaintDevice *dev);
+ void setRenderableType(QEgl::API api);
bool reduceConfiguration();