add no_swap info to GLES engine for supporting lock/unlock feature
authorGwanglim Lee <gl77.lee@samsung.com>
Tue, 29 Jun 2010 07:51:22 +0000 (16:51 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 29 Jun 2010 07:51:22 +0000 (16:51 +0900)
src/modules/engines/gl_x11/Evas_Engine_GL_X11.h
src/modules/engines/gl_x11/evas_engine.c

index 7224f9c..72aa7fc 100644 (file)
@@ -42,6 +42,7 @@ struct _Evas_Engine_Info_GL_X11
    
    unsigned char vsync : 1; // does nothing right now
    unsigned char indirect : 1; // use indirect rendering
+   unsigned char no_swap : 1; // just GLES flush, no swap
 };
 #endif
 
index bd39f75..5cec1ab 100644 (file)
@@ -351,6 +351,10 @@ eng_setup(Evas *e, void *in)
              eng_window_use(re->win);
              evas_gl_common_context_resize(re->win->gl_context, re->win->w, re->win->h, re->win->rot);
           }
+        else if (info->no_swap == 0)
+          {
+             eglSwapBuffers(re->win->egl_disp, re->win->egl_surface[0]);
+          }
         
      }
    if (!re->win)
@@ -576,7 +580,10 @@ eng_output_flush(void *data)
 #ifdef FRAMECOUNT
    double t0 = get_time();
 #endif   
-   eglSwapBuffers(re->win->egl_disp, re->win->egl_surface[0]);
+   if (re->info->no_swap)
+     glFlush();
+   else
+     eglSwapBuffers(re->win->egl_disp, re->win->egl_surface[0]);
 #ifdef FRAMECOUNT
    double t1 = get_time();
    printf("%1.5f\n", t1 - t0);