add ecore_evas_gl_x11_no_swap_set for supporting lock/unlock feature
authorGwanglim Lee <gl77.lee@samsung.com>
Tue, 29 Jun 2010 07:53:57 +0000 (16:53 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 29 Jun 2010 07:53:57 +0000 (16:53 +0900)
src/lib/ecore_evas/Ecore_Evas.h
src/lib/ecore_evas/ecore_evas_x.c

index 61a0d5b..19c143f 100644 (file)
@@ -163,6 +163,7 @@ EAPI void            ecore_evas_gl_x11_direct_resize_set(Ecore_Evas *ee, int on)
 EAPI int             ecore_evas_gl_x11_direct_resize_get(const Ecore_Evas *ee);
 EAPI void            ecore_evas_gl_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win);
 EAPI void            ecore_evas_gl_x11_pre_post_swap_callback_set(const Ecore_Evas *ee, void *data, void (*pre_cb) (void *data, Evas *e), void (*post_cb) (void *data, Evas *e));
+EAPI void            ecore_evas_gl_x11_no_swap_set(const Ecore_Evas *ee, Eina_Bool no_swap);
        
 EAPI Ecore_Evas     *ecore_evas_xrender_x11_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h);
 EAPI Ecore_X_Window  ecore_evas_xrender_x11_window_get(const Ecore_Evas *ee);
index aa820fe..86f1f62 100755 (executable)
@@ -3300,6 +3300,36 @@ ecore_evas_gl_x11_pre_post_swap_callback_set(const Ecore_Evas *ee, void *data, v
 }
 #endif /* ! BUILD_ECORE_EVAS_OPENGL_X11 */
 
+
+/*
+ * @param ee
+ * @param no_swap If = 1, ee doesn't perform swap buffer.
+ *                If = 0, ee performs swap buffer.
+ */
+#ifdef BUILD_ECORE_EVAS_OPENGL_X11
+EAPI void
+ecore_evas_gl_x11_no_swap_set(const Ecore_Evas *ee, Eina_Bool no_swap)
+{
+   Evas_Engine_Info_GL_X11 *einfo;
+   if (!(!strcmp(ee->driver, "opengl_x11"))) return;
+   einfo = (Evas_Engine_Info_GL_X11 *)evas_engine_info_get(ee->evas);
+   if (einfo)
+     {
+       einfo->no_swap = no_swap;
+       if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
+          {
+             ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
+          }
+     }
+}
+#else
+EAPI void
+ecore_evas_gl_x11_no_swap_set(const Ecore_Evas *ee, Eina_Bool no_swap)
+{
+   return;
+}
+#endif /* ! BUILD_ECORE_EVAS_OPENGL_X11 */
+
 /**
  * To be documented.
  *