summaryrefslogtreecommitdiffstats
path: root/src/gui/egl
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-02-19 17:17:08 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-03-02 08:24:24 (GMT)
commitc993aef82eca9f5d5241093f407179e4189ab7f1 (patch)
tree7671d90bd1ebc552b35dd712d2647e483016adb5 /src/gui/egl
parent4c5549269144eae79bdcefc7119b2adf3044e000 (diff)
downloadQt-c993aef82eca9f5d5241093f407179e4189ab7f1.zip
Qt-c993aef82eca9f5d5241093f407179e4189ab7f1.tar.gz
Qt-c993aef82eca9f5d5241093f407179e4189ab7f1.tar.bz2
Add QEglContext::configAttrib(int name) helper
Reviewed-By: TrustMe
Diffstat (limited to 'src/gui/egl')
-rw-r--r--src/gui/egl/qegl.cpp10
-rw-r--r--src/gui/egl/qeglcontext_p.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp
index 8bd4d7f..d4c9913 100644
--- a/src/gui/egl/qegl.cpp
+++ b/src/gui/egl/qegl.cpp
@@ -510,6 +510,16 @@ bool QEglContext::configAttrib(int name, EGLint *value) const
return eglGetConfigAttrib(QEgl::display(), cfg, name, value);
}
+int QEglContext::configAttrib(int name) const
+{
+ EGLint value;
+ EGLBoolean success = eglGetConfigAttrib(QEgl::display(), cfg, name, &value);
+ if (success)
+ return value;
+ else
+ return EGL_DONT_CARE;
+}
+
QEglProperties QEglContext::configProperties() const
{
return QEglProperties(config());
diff --git a/src/gui/egl/qeglcontext_p.h b/src/gui/egl/qeglcontext_p.h
index c656d1d..7eec7eb 100644
--- a/src/gui/egl/qeglcontext_p.h
+++ b/src/gui/egl/qeglcontext_p.h
@@ -89,6 +89,7 @@ public:
void waitClient();
bool configAttrib(int name, EGLint *value) const;
+ int configAttrib(int name) const;
EGLContext context() const { return ctx; }
void setContext(EGLContext context) { ctx = context; ownsContext = false;}