YaGL: support EGL_NATIVE_VISUAL_ID for GBM 31/53731/1 accepted/tizen/mobile/20151215.124619 accepted/tizen/mobile/20151215.124651 accepted/tizen/tv/20151215.125231 accepted/tizen/wearable/20151215.125518 submit/tizen/20151215.084935 submit/tizen_common/20160223.170033
authorJinhyung Jo <jinhyung.jo@samsung.com>
Wed, 9 Dec 2015 04:33:51 +0000 (13:33 +0900)
committerJinhyung Jo <jinhyung.jo@samsung.com>
Wed, 9 Dec 2015 04:49:20 +0000 (13:49 +0900)
The EGL_KHR_platform_gbm extension has specific behavior
for the EGL_NATIVE_VISUAL_ID.
There is following contents in the EGL officail size,
(https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_platform_gbm.txt)
New Behavior section
"For each EGLConfig that belongs to the GBM platform, the
 EGL_NATIVE_VISUAL_ID attribute is a GBM color format, such as
 GBM_FORMAT_XRGB8888. "

The EFL EVAS in Tizen requires the GBM_FORMAT_ARGB8888.
And YaGL can support this format. So returns it.
This is W/A patch. Must be resolved correclty.

Change-Id: I402ebb20d17bf1a119ca09154519d57305e539a7
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
EGL/gbm/yagl_gbm_display.c

index 9981e74531a36ab0a09e0f428ecc801f4e1d0cc3..e4f1d593c14dd0fa3220893c19f6c0c0929056e1 100644 (file)
@@ -136,7 +136,15 @@ static int yagl_gbm_display_get_visual(struct yagl_native_display *dpy,
                                        int *visual_id,
                                        int *visual_type)
 {
-    *visual_id = 0;
+    /* XXX: W/A for evas
+       efl GIT: platform/upstream/efl
+       evas src: /src/modules/evas/engines/gl_drm/evas_outbuf.c
+       evas func.: _evas_outbuf_egl_setup()
+       reference: https://www.khronos.org/registry/egl/
+                          extensions/KHR/EGL_KHR_platform_gbm.txt
+                  read 'New Behavior' section
+    */
+    *visual_id = GBM_FORMAT_ARGB8888;
     *visual_type = 0;
 
     return 1;