summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-08-04 16:11:00 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-08-04 16:14:10 -0400
commit7b1e38a5b1a5c92a57b8385c162fb96cb5e4e762 (patch)
treec846ea08cb886e8a214b5819ef7cf704deaa7b30
parent54859be862a3c84c1d780f8551db0cba6a135f3a (diff)
efl-wl: do shm pool ref/unref for bm safety
@fix
-rw-r--r--src/lib/efl_wl/efl_wl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 3b8729c8fe..fbb6b11829 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -99,6 +99,7 @@ typedef struct Comp_Buffer
99 int x, y, w, h; 99 int x, y, w, h;
100 struct wl_listener destroy_listener; 100 struct wl_listener destroy_listener;
101 struct wl_shm_buffer *shm_buffer; 101 struct wl_shm_buffer *shm_buffer;
102 struct wl_shm_pool *pool;
102 struct linux_dmabuf_buffer *dmabuf_buffer; 103 struct linux_dmabuf_buffer *dmabuf_buffer;
103 Eina_Bool dbg : 1; 104 Eina_Bool dbg : 1;
104} Comp_Buffer; 105} Comp_Buffer;
@@ -1254,6 +1255,7 @@ comp_surface_buffer_detach(Comp_Buffer **pbuffer)
1254 eina_list_free(buffer->renders); 1255 eina_list_free(buffer->renders);
1255 wl_list_remove(&buffer->destroy_listener.link); 1256 wl_list_remove(&buffer->destroy_listener.link);
1256 //if (buffer->dbg) fprintf(stderr, "BUFFER(%d) RELEASE\n", wl_resource_get_id(buffer->res)); 1257 //if (buffer->dbg) fprintf(stderr, "BUFFER(%d) RELEASE\n", wl_resource_get_id(buffer->res));
1258 if (buffer->pool) wl_shm_pool_unref(buffer->pool);
1257 wl_resource_queue_event(buffer->res, WL_BUFFER_RELEASE); 1259 wl_resource_queue_event(buffer->res, WL_BUFFER_RELEASE);
1258 free(buffer); 1260 free(buffer);
1259 *pbuffer = NULL; 1261 *pbuffer = NULL;
@@ -1301,6 +1303,7 @@ comp_surface_commit_image_state(Comp_Surface *cs, Comp_Buffer *buffer, Evas_Obje
1301 //if (cs->subsurface) 1303 //if (cs->subsurface)
1302 //fprintf(stderr, "SET CB\n"); 1304 //fprintf(stderr, "SET CB\n");
1303 evas_object_image_pixels_get_callback_set(o, comp_surface_pixels_get, cs); 1305 evas_object_image_pixels_get_callback_set(o, comp_surface_pixels_get, cs);
1306 buffer->pool = wl_shm_buffer_ref_pool(buffer->shm_buffer);
1304 } 1307 }
1305 else 1308 else
1306 { 1309 {