e_comp_wl_tbm: ref tbm surface in e_comp_wl_tbm_buffer_get 99/168099/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Mon, 15 Jan 2018 03:46:30 +0000 (12:46 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 24 Jan 2018 07:17:15 +0000 (07:17 +0000)
Change-Id: I851af07a1dd965ff7a3f0bf11f21b54277f8df10

src/bin/e_comp_wl_tbm.c
src/bin/e_plane_renderer.c

index 8ade34ad03ff0cde4a34edc0aa005ca6fc8cb6b0..59060a5a9f99de7d12a5e1795db7818a5611a999 100644 (file)
@@ -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;
 }
 
index dc55f4f1decc4b272d1bc7ccd39c1fddd2c4bd20..b068d7908a2f5f2677148e3c24adc6d0d2565e08 100644 (file)
@@ -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 */