Modified no_swap codes in order to ensure the correct screen appearance.
authorGwanglim Lee <gl77.lee@samsung.com>
Fri, 2 Jul 2010 04:58:23 +0000 (13:58 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Fri, 2 Jul 2010 04:58:23 +0000 (13:58 +0900)
debian/changelog
src/modules/engines/gl_x11/Evas_Engine_GL_X11.h
src/modules/engines/gl_x11/evas_engine.c

index af29d37..7d28869 100644 (file)
@@ -1,3 +1,11 @@
+evas (0.9.9.060+svn.49540slp2+3build08) unstable; urgency=low
+
+  * Modified no_swap codes in order to ensure the correct screen appearance.
+  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/EFL-pkgs/evas
+  * Tag: evas_0.9.9.060+svn.49540slp2+3build08
+
+ -- Gwanglim Lee <gl77.lee@samsung.com>  Fri, 02 Jul 2010 13:55:18 +0900
+
 evas (0.9.9.060+svn.49540slp2+3build07) unstable; urgency=low
 
   * add no_swap info to GLES engine for supporting lock/unlock feature.
index 72aa7fc..e0adcce 100644 (file)
@@ -43,6 +43,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
+   unsigned int  num_deferred_swaps : 1; // number of deferred swap buffer operations
 };
 #endif
 
index 5cec1ab..433db2b 100644 (file)
@@ -351,9 +351,23 @@ 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 == 1)
+          {
+             info->num_deferred_swaps = 0;
+          }
         else if (info->no_swap == 0)
           {
-             eglSwapBuffers(re->win->egl_disp, re->win->egl_surface[0]);
+             if (info->num_deferred_swaps > 0)
+               {
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+                  if (re->win->egl_disp && re->win->egl_surface[0])
+                    eglSwapBuffers(re->win->egl_disp, re->win->egl_surface[0]);
+#else
+                  if (re->win->disp && re->win->win)
+                     glXSwapBuffers(re->win->disp, re->win->win);
+#endif
+                  info->num_deferred_swaps = 0;
+               }
           }
         
      }
@@ -581,7 +595,10 @@ eng_output_flush(void *data)
    double t0 = get_time();
 #endif   
    if (re->info->no_swap)
-     glFlush();
+     {
+        glFlush();
+        re->info->num_deferred_swaps++;
+     }
    else
      eglSwapBuffers(re->win->egl_disp, re->win->egl_surface[0]);
 #ifdef FRAMECOUNT
@@ -616,7 +633,13 @@ eng_output_flush(void *data)
 //       (re->win->draw.y2 == (re->win->h - 1))
        )
      {
-        glXSwapBuffers(re->win->disp, re->win->win);
+        if (re->info->no_swap)
+          {
+             glFlush();
+             re->info->num_deferred_swaps++;
+          }
+        else
+          glXSwapBuffers(re->win->disp, re->win->win);
      }
    else
      {