Add test for 'swapping' (ie: buffering).
authorChristopher Michael <cp.michael@samsung.com>
Thu, 24 Jan 2013 09:16:09 +0000 (09:16 +0000)
committerChristopher Michael <cpmichael1@comcast.net>
Thu, 24 Jan 2013 09:16:09 +0000 (09:16 +0000)
NB: This env variable is going to change for the wayland engine(s).

Signed-off-by: Christopher Michael <cp.michael@samsung.com>
SVN revision: 83238

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

index 4169555..d7b2fbd 100644 (file)
@@ -100,6 +100,8 @@ eng_setup(Evas *eo_evas, void *einfo)
    /* test for valid engine output */
    if (!(re = epd->engine.data.output))
      {
+        static int try_swap = -1;
+
         /* NB: If we have no valid output then assume we have not been 
          * initialized yet and call any needed common init routines */
         evas_common_cpu_init();
@@ -113,6 +115,14 @@ eng_setup(Evas *eo_evas, void *einfo)
         evas_common_font_init();
         evas_common_draw_init();
         evas_common_tilebuf_init();
+
+        if (try_swap == -1)
+          {
+             /* check for env var to see if we should try swapping */
+             if (getenv("EVAS_NO_DRI_SWAPBUF")) try_swap = 0;
+             else try_swap = 1;
+          }
+
      }
 
    return 0;