If we have an existing render engine already, then free the existing
authorChristopher Michael <cp.michael@samsung.com>
Thu, 24 Jan 2013 09:17:15 +0000 (09:17 +0000)
committerChristopher Michael <cpmichael1@comcast.net>
Thu, 24 Jan 2013 09:17:15 +0000 (09:17 +0000)
output buffer, create a new one, and assign render engine functions.

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

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

index 5161e552d6e2d1e68914751f34a8a8bd249cce8b..da7e21dac1a7b6b1cc5c93667e994b9c7f961105 100644 (file)
@@ -181,7 +181,28 @@ eng_setup(Evas *eo_evas, void *einfo)
                                    info->info.wl_shm, info->info.wl_surface, 
                                    try_swap)))
           return 0;
+     }
 
+   else
+     {
+        /* we have an existing render engine */
+        if (re->ob) re->outbuf_free(re->ob);
+
+        if ((re->ob = evas_swapbuf_setup(epd->output.w, epd->output.h, 
+                                         info->info.rotation, 
+                                         info->info.depth, 
+                                         info->info.destination_alpha, 
+                                         info->info.wl_shm, 
+                                         info->info.wl_surface)))
+          {
+             re->outbuf_free = evas_swapbuf_free;
+             re->outbuf_reconfigure = evas_swapbuf_reconfigure;
+             re->outbuf_update_region_new = evas_swapbuf_update_region_new;
+             re->outbuf_update_region_push = evas_swapbuf_update_region_push;
+             re->outbuf_update_region_free = evas_swapbuf_update_region_free;
+             re->outbuf_flush = evas_swapbuf_flush;
+             re->outbuf_idle_flush = evas_swapbuf_idle_flush;
+          }
      }
 
    return 0;