If we have an existing outbuf, then free the old one and try to create
authorChris Michael <cp.michael@samsung.com>
Tue, 30 Apr 2013 06:20:52 +0000 (07:20 +0100)
committerChris Michael <cp.michael@samsung.com>
Tue, 30 Apr 2013 06:20:52 +0000 (07:20 +0100)
a new one.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/modules/evas/engines/drm/evas_engine.c

index 5b3003c..b025432 100644 (file)
@@ -139,14 +139,23 @@ eng_setup(Evas *evas, void *einfo)
                                  info->info.rotation, info->info.depth, 
                                  info->info.destination_alpha, swap)))
           return 0;
-
-        re->info = info;
      }
    else
      {
+        /* if we have an existing outbuf, free it */
+        if (re->ob) evas_outbuf_free(re->ob);
 
+        /* try to create a new outbuf */
+        if (!(re->ob = 
+              evas_outbuf_setup(epd->output.w, epd->output.h, 
+                                info->info.rotation, info->info.depth, 
+                                info->info.destination_alpha)))
+          return 0;
      }
 
+   /* update the info structure pointer */
+   re->info = info;
+
    /* reassign engine output */
    epd->engine.data.output = re;
    if (!epd->engine.data.output) return 0;