From: Changyeon Lee Date: Mon, 15 Jan 2018 03:46:30 +0000 (+0900) Subject: e_comp_wl_tbm: ref tbm surface in e_comp_wl_tbm_buffer_get X-Git-Tag: submit/tizen/20180131.084907~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d127de6d88bb277b49d9e6bd1942ba7f2843edcc;p=platform%2Fupstream%2Fenlightenment.git e_comp_wl_tbm: ref tbm surface in e_comp_wl_tbm_buffer_get Change-Id: I851af07a1dd965ff7a3f0bf11f21b54277f8df10 --- diff --git a/src/bin/e_comp_wl_tbm.c b/src/bin/e_comp_wl_tbm.c index 8ade34ad03..59060a5a9f 100644 --- a/src/bin/e_comp_wl_tbm.c +++ b/src/bin/e_comp_wl_tbm.c @@ -103,6 +103,8 @@ e_comp_wl_tbm_buffer_get(tbm_surface_h tsurface) buffer->shm_buffer = NULL; wl_signal_init(&buffer->destroy_signal); + tbm_surface_internal_ref(tsurface); + return buffer; } diff --git a/src/bin/e_plane_renderer.c b/src/bin/e_plane_renderer.c index dc55f4f1de..b068d7908a 100644 --- a/src/bin/e_plane_renderer.c +++ b/src/bin/e_plane_renderer.c @@ -366,6 +366,8 @@ _e_plane_renderer_client_backup_buffer_set(E_Plane_Renderer_Client *renderer_cli e_pixmap_dirty(ec->pixmap); e_pixmap_refresh(ec->pixmap); + tbm_surface_internal_unref(copied_tsurface); + return EINA_TRUE; fail : @@ -930,13 +932,8 @@ _e_plane_renderer_recover_ec(E_Plane_Renderer *renderer) tsurface = e_plane_renderer_displaying_surface_get(renderer); if (!tsurface) return; - tbm_surface_internal_ref(tsurface); buffer = e_comp_wl_tbm_buffer_get(tsurface); - if (!buffer) - { - tbm_surface_internal_unref(tsurface); - return; - } + if (!buffer) return; } /* force update */