From: Boram Park Date: Fri, 18 Sep 2015 07:05:30 +0000 (+0900) Subject: not keep a tbm_surface object X-Git-Tag: accepted/tizen/mobile/20150921.090158~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64d5eb5aec1f3f5e65c7e7b8553fcc5a31c9a62d;p=platform%2Fcore%2Fuifw%2Fwayland-tbm.git not keep a tbm_surface object Change-Id: I1c12794ebaa47243f82dd5700280b3660fc6c0c9 --- diff --git a/src/wayland-tbm-client.c b/src/wayland-tbm-client.c index 27e6d96..3d09eb0 100755 --- a/src/wayland-tbm-client.c +++ b/src/wayland-tbm-client.c @@ -309,9 +309,6 @@ wayland_tbm_client_create_buffer(struct wayland_tbm_client *tbm_client, tbm_surf goto err; } - wl_buffer_set_user_data(wl_buffer, surface); - tbm_surface_internal_ref(surface); - for (i = 0; i < TBM_SURF_PLANE_MAX; i++) { if (is_fd == 1 && (bufs[i] > 0)) close(bufs[i]); @@ -334,15 +331,10 @@ wayland_tbm_client_destroy_buffer(struct wayland_tbm_client *tbm_client, struct WL_TBM_RETURN_IF_FAIL(tbm_client != NULL); WL_TBM_RETURN_IF_FAIL(buffer != NULL); - tbm_surface_h surface; - // TODO: valid check if the buffer is from this tbm_client??? - surface = (tbm_surface_h)wl_buffer_get_user_data(buffer); wl_buffer_set_user_data(buffer, NULL); wl_buffer_destroy(buffer); - if (surface) - tbm_surface_internal_unref(surface); } @@ -370,17 +362,6 @@ wayland_tbm_client_get_bufmgr(struct wayland_tbm_client *tbm_client) return (void *)tbm_client->bufmgr; } -tbm_surface_h -wayland_tbm_client_get_surface(struct wayland_tbm_client *tbm_client, struct wl_buffer* buffer) -{ - WL_TBM_RETURN_VAL_IF_FAIL(tbm_client != NULL, NULL); - WL_TBM_RETURN_VAL_IF_FAIL(buffer != NULL, NULL); - - // TODO: valid check if the buffer is from this tbm_client??? - - return (tbm_surface_h)wl_buffer_get_user_data(buffer); -} - int32_t _wayland_tbm_client_get_auth_fd(struct wayland_tbm_client *tbm_client) { diff --git a/src/wayland-tbm-client.h b/src/wayland-tbm-client.h index 148a15c..a80ddb7 100755 --- a/src/wayland-tbm-client.h +++ b/src/wayland-tbm-client.h @@ -48,7 +48,6 @@ void wayland_tbm_client_destroy_buffer(struct wayland_tbm_client *t const char *wayland_tbm_client_get_device_name(struct wayland_tbm_client* tbm_client); uint32_t wayland_tbm_client_get_capability(struct wayland_tbm_client* tbm_client); void *wayland_tbm_client_get_bufmgr(struct wayland_tbm_client* tbm_client); -tbm_surface_h wayland_tbm_client_get_surface(struct wayland_tbm_client *tbm_client, struct wl_buffer* buffer); #ifdef __cplusplus }