Fix configuration for webgl surface which does not have alpha attribute.
authorYongGeol Jung <yg48.jung@samsung.com>
Tue, 9 Apr 2013 07:52:56 +0000 (16:52 +0900)
committerYongGeol Jung <yg48.jung@samsung.com>
Tue, 9 Apr 2013 07:52:56 +0000 (16:52 +0900)
[Title] Fix configuration for webgl surface which does not have alpha attribute.
[Issue#] TWEB-1121
[Problem] getIntegerv(ALPHA_BITS) returns 8 even if alpha is none.
[Cause] Configuration was wrong.
[Solution] Fix configuration.

Change-Id: I7ab508853325728f79cff49a5e5414affd50ef6f

Source/WebCore/platform/graphics/efl/tizen/SharedPlatformSurfaceTizen.cpp

index c6a52b3..a53a8a0 100755 (executable)
@@ -187,7 +187,13 @@ bool PixmapContextTizen::initialize()
     configAttribs[i++] = EGL_BLUE_SIZE;
     configAttribs[i++] = 8;
     configAttribs[i++] = EGL_ALPHA_SIZE;
-    configAttribs[i++] = 8;
+    if (m_hasAlpha)
+        configAttribs[i++] = 8;
+    else {
+        configAttribs[i++] = 0;
+        configAttribs[i++] = EGL_CONFIG_CAVEAT;
+        configAttribs[i++] = EGL_NON_CONFORMANT_CONFIG;
+    }
 
     if (m_isLockable) {
         configAttribs[i++] = EGL_MATCH_FORMAT_KHR;