summaryrefslogtreecommitdiffstats
path: root/src/gui/egl/qeglproperties.cpp
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/qeglproperties.cpp
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/qeglproperties.cpp')
-rw-r--r--src/gui/egl/qeglproperties.cpp11
1 files changed, 11 insertions, 0 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)