EvasGL: Fix the bug as EvasGL can not find the config
authorWonsik, Jung <sidein@samsung.com>
Thu, 14 Dec 2017 02:28:24 +0000 (11:28 +0900)
committerJiyoun Park <jy0703.park@samsung.com>
Thu, 21 Dec 2017 13:34:07 +0000 (22:34 +0900)
Fix the bug of reset config value by native window config
@TIZEN_ONLY

Change-Id: Ie3518fcbc9480f03288b57bd427b05b550bcf380

src/modules/evas/engines/gl_common/evas_gl_core.c
src/modules/evas/engines/wayland_shm/evas_engine.c

index b6bf159..3c2662d 100755 (executable)
@@ -1529,6 +1529,8 @@ _internal_config_set(void *eng_data, EVGL_Surface *sfc, Evas_GL_Context_Version
    int color_bit = 0, depth_bit = 0, stencil_bit = 0, msaa_samples = 0;
    int depth_size = 0;
    int native_win_depth = 0, native_win_stencil = 0, native_win_msaa = 0;
+   // TIZEN_ONLY : prohibit to initialize with native data continuously
+   int updated_by_wincfg = 0;
    Evas_GL_Config *cfg = &sfc->cfg;
    int caps_idx = version - 1;
 
@@ -1634,7 +1636,7 @@ try_again:
                   // When direct rendering is enabled, FBO configuration should match
                   // window surface configuration as FBO will be used in fallback cases.
                   // So we search again for the formats that match window surface's.
-                  if (sfc->direct_fb_opt &&
+                  if (sfc->direct_fb_opt && !updated_by_wincfg &&
                       ((native_win_depth != depth_size) ||
                        (native_win_stencil != stencil_bit) ||
                        (native_win_msaa != msaa_samples)))
@@ -1644,6 +1646,8 @@ try_again:
                        depth_size = native_win_depth;
                        stencil_bit = native_win_stencil;
                        msaa_samples = native_win_msaa;
+                       // TIZEN_ONLY : prohibit to initialize with native data continuously
+                       updated_by_wincfg = 1;
                        goto try_again;
                     }
                }
index d587aba..632d410 100644 (file)
@@ -210,7 +210,9 @@ eng_image_native_set(void *engine EINA_UNUSED, void *image, void *native)
 {
    Evas_Native_Surface *ns = native;
    Image_Entry *ie = image;
-   RGBA_Image *im = image, *im2;
+   //TIZEN_ONLY : fix to build warning
+   RGBA_Image *im = image;
+   RGBA_Image *im2 = NULL;
    int stride;
 
    if (!im || !ns) return im;