summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-08-29 14:58:09 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-08-29 14:58:09 +0900
commit70f443d8a8e1dcf9e9f163190ffc228ace6660de (patch)
treeb00f66413afc1d6f145753979c44bb3b2e2bd28f
parentbcb9ccb1291d2e67d91d620d21b187d9854399d8 (diff)
evas - avoid memleak on rotation of tilebuf in engine for gl and sw possibly.
-rw-r--r--src/modules/evas/engines/gl_x11/evas_engine.c1
-rw-r--r--src/modules/evas/engines/software_x11/evas_engine.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c
index 82f97d64a6..cda7fe7e6f 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -1003,6 +1003,7 @@ eng_setup(Evas *eo_e, void *in)
1003 free(re); 1003 free(re);
1004 return 0; 1004 return 0;
1005 } 1005 }
1006 if (re->tb) evas_common_tilebuf_free(re->tb);
1006 re->tb = evas_common_tilebuf_new(re->win->w, re->win->h); 1007 re->tb = evas_common_tilebuf_new(re->win->w, re->win->h);
1007 if (!re->tb) 1008 if (!re->tb)
1008 { 1009 {
diff --git a/src/modules/evas/engines/software_x11/evas_engine.c b/src/modules/evas/engines/software_x11/evas_engine.c
index d5fbe66104..4a1bf4b45b 100644
--- a/src/modules/evas/engines/software_x11/evas_engine.c
+++ b/src/modules/evas/engines/software_x11/evas_engine.c
@@ -188,6 +188,7 @@ _output_xlib_setup(int w, int h, int rot, Display *disp, Drawable draw,
188// re->ob->onebuf = 1; 188// re->ob->onebuf = 1;
189 189
190 evas_software_xlib_outbuf_debug_set(re->ob, debug); 190 evas_software_xlib_outbuf_debug_set(re->ob, debug);
191 if (re->tb) evas_common_tilebuf_free(re->tb);
191 re->tb = evas_common_tilebuf_new(w, h); 192 re->tb = evas_common_tilebuf_new(w, h);
192 if (!re->tb) 193 if (!re->tb)
193 { 194 {
@@ -227,6 +228,7 @@ _output_swapbuf_setup(int w, int h, int rot, Display *disp, Drawable draw,
227 return NULL; 228 return NULL;
228 } 229 }
229 230
231 if (re->tb) evas_common_tilebuf_free(re->tb);
230 re->tb = evas_common_tilebuf_new(w, h); 232 re->tb = evas_common_tilebuf_new(w, h);
231 if (!re->tb) 233 if (!re->tb)
232 { 234 {
@@ -278,6 +280,7 @@ _output_xcb_setup(int w, int h, int rot, xcb_connection_t *conn,
278 280
279 evas_software_xcb_outbuf_debug_set(re->ob, debug); 281 evas_software_xcb_outbuf_debug_set(re->ob, debug);
280 282
283 if (re->tb) evas_common_tilebuf_free(re->tb);
281 re->tb = evas_common_tilebuf_new(w, h); 284 re->tb = evas_common_tilebuf_new(w, h);
282 if (!re->tb) 285 if (!re->tb)
283 { 286 {