elm_win: Add feature to set depth/stencil/msaa bit to window surface 63/52463/3
authorDaeKwang Ryu <dkdk.ryu@samsung.com>
Mon, 23 Nov 2015 07:55:42 +0000 (16:55 +0900)
committerDaeKwang Ryu <dkdk.ryu@samsung.com>
Fri, 4 Dec 2015 08:00:11 +0000 (17:00 +0900)
Add feature to set depth/stencil/msaa bit to window surface
for wayland_egl backend.

Change-Id: Ia3cd34e0b5d4003a01db017ddc0a83bee33ef530

src/lib/elm_win.c

index 73f2cbd..916c746 100644 (file)
@@ -3713,7 +3713,35 @@ _elm_win_finalize_internal(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_
              else if (!strcmp(enginelist[i], ELM_WAYLAND_SHM))
                tmp_sd.ee = ecore_evas_wayland_shm_new(NULL, 0, 0, 0, 1, 1, 0);
              else if (!strcmp(enginelist[i], ELM_WAYLAND_EGL))
-               tmp_sd.ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 0, 1, 1, 0);
+               {
+                  int opt[20], opt_i = 0;
+
+                  if (_elm_config->vsync)
+                    {
+                       opt[opt_i++] = ECORE_EVAS_OPT_VSYNC;
+                       opt[opt_i++] = 1;
+                    }
+                  if (_elm_config->gl_depth)
+                    {
+                       opt[opt_i++] = ECORE_EVAS_OPT_GL_DEPTH;
+                       opt[opt_i++] = _elm_config->gl_depth;
+                    }
+                  if (_elm_config->gl_stencil)
+                    {
+                       opt[opt_i++] = ECORE_EVAS_OPT_GL_STENCIL;
+                       opt[opt_i++] = _elm_config->gl_stencil;
+                    }
+                  if (_elm_config->gl_msaa)
+                    {
+                       opt[opt_i++] = ECORE_EVAS_OPT_GL_MSAA;
+                       opt[opt_i++] = _elm_config->gl_msaa;
+                    }
+                  opt[opt_i] = 0;
+                  if (opt_i > 0)
+                    tmp_sd.ee = ecore_evas_wayland_egl_options_new(NULL, 0, 0, 0, 1, 1, 0, opt);
+                  else
+                    tmp_sd.ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 0, 1, 1, 0);
+               }
              else if (!strcmp(enginelist[i], ELM_SOFTWARE_WIN32))
                tmp_sd.ee = ecore_evas_software_gdi_new(NULL, 0, 0, 1, 1);
              else if (!strcmp(enginelist[i], ELM_SOFTWARE_DDRAW))