diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-04-15 12:10:50 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-04-16 12:52:12 (GMT) |
commit | 5480e3b68da98253ae6ec58bd0db0075225a4e22 (patch) | |
tree | a23c222a11182edb210c9fc41a77431af1087540 /src/openvg | |
parent | dda010b51b8e3ec6955b64290ad47c0f43dcda73 (diff) | |
download | Qt-5480e3b68da98253ae6ec58bd0db0075225a4e22.zip Qt-5480e3b68da98253ae6ec58bd0db0075225a4e22.tar.gz Qt-5480e3b68da98253ae6ec58bd0db0075225a4e22.tar.bz2 |
Cleanup & remove unused function overloads from QEgl* APIs
This should make stubbing out these APIs slightly easier.
Reviewed-By: TrustMe
Diffstat (limited to 'src/openvg')
-rw-r--r-- | src/openvg/qwindowsurface_vgegl.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp index 13ae807..7850a5b 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 |