summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-17 20:53:55 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-17 20:53:55 (GMT)
commitd484656fcf0ba5422489628c9e2e89aade81e869 (patch)
treefd11fbc963430b7972f8b1d41070c78d4ffb821f /src/openvg
parentfd36b47e8758562fc9ff350f292fc9ae9ed91d4e (diff)
parent8ebcd4db8d57b7e90ec86c9290682ee9c2e576b7 (diff)
downloadQt-d484656fcf0ba5422489628c9e2e89aade81e869.zip
Qt-d484656fcf0ba5422489628c9e2e89aade81e869.tar.gz
Qt-d484656fcf0ba5422489628c9e2e89aade81e869.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Some QWindowSurface implementations might implement flush as a buffer Set EGL_SWAP_BEHAVIOR to EGL_BUFFER_PRESERVED for regular QWidgets Cleanup & remove unused function overloads from QEgl* APIs QScrollArea: Excessive scrolling in focusNextPrevChild()
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qwindowsurface_vgegl.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp
index 92c4371..e3f52f4e 100644
--- a/src/openvg/qwindowsurface_vgegl.cpp
+++ b/src/openvg/qwindowsurface_vgegl.cpp
@@ -71,18 +71,13 @@ VGImageFormat qt_vg_config_to_vg_format(QEglContext *context)
QImage::Format qt_vg_config_to_image_format(QEglContext *context)
{
- EGLint red = 0;
- EGLint green = 0;
- EGLint blue = 0;
- EGLint alpha = 0;
- context->configAttrib(EGL_RED_SIZE, &red);
- context->configAttrib(EGL_GREEN_SIZE, &green);
- context->configAttrib(EGL_BLUE_SIZE, &blue);
- context->configAttrib(EGL_ALPHA_SIZE, &alpha);
+ EGLint red = context->configAttrib(EGL_RED_SIZE);
+ EGLint green = context->configAttrib(EGL_GREEN_SIZE);
+ EGLint blue = context->configAttrib(EGL_BLUE_SIZE);
+ EGLint alpha = context->configAttrib(EGL_ALPHA_SIZE);
QImage::Format argbFormat;
#ifdef EGL_VG_ALPHA_FORMAT_PRE_BIT
- EGLint type = 0;
- context->configAttrib(EGL_SURFACE_TYPE, &type);
+ EGLint type = context->configAttrib(EGL_SURFACE_TYPE);
if ((type & EGL_VG_ALPHA_FORMAT_PRE_BIT) != 0)
argbFormat = QImage::Format_ARGB32_Premultiplied;
else
@@ -210,11 +205,7 @@ void qt_vg_unregister_pixmap(QVGPixmapData *pd)
static bool isPremultipliedContext(const QEglContext *context)
{
- EGLint value = 0;
- if (context->configAttrib(EGL_SURFACE_TYPE, &value))
- return (value & EGL_VG_ALPHA_FORMAT_PRE_BIT) != 0;
- else
- return false;
+ return context->configAttrib(EGL_SURFACE_TYPE) & EGL_VG_ALPHA_FORMAT_PRE_BIT;
}
#endif