From 495ba974b6f84205be48bfd478cc71d8078eceb2 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Wed, 14 Oct 2009 09:17:46 +1000 Subject: Explicitly request the alpha mask in the EGL configuration The EGL implementation used in S60/NGA for OpenVG does not return a configuration with alpha masking unless it is explicitly requested. Reviewed-by: Julian de Bhal --- src/openvg/qwindowsurface_vgegl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp index 3ae911f..d622c1f 100644 --- a/src/openvg/qwindowsurface_vgegl.cpp +++ b/src/openvg/qwindowsurface_vgegl.cpp @@ -211,6 +211,10 @@ static QEglContext *createContext(QPaintDevice *device) int redSize = configProps.value(EGL_RED_SIZE); if (redSize == EGL_DONT_CARE || redSize == 0) configProps.setPixelFormat(QImage::Format_ARGB32); // XXX +#ifndef QVG_SCISSOR_CLIP + // If we are using the mask to clip, then explicitly request a mask. + configProps.setValue(EGL_ALPHA_MASK_SIZE, 1); +#endif #ifdef EGL_VG_ALPHA_FORMAT_PRE_BIT configProps.setValue(EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT | EGL_VG_ALPHA_FORMAT_PRE_BIT); -- cgit v0.12