tbm_server: add get_resource function 50/279850/1 accepted/tizen/unified/20220821.211122 submit/tizen/20220818.083245 submit/tizen/20220819.052238
authorJunkyeong Kim <jk0430.kim@samsung.com>
Thu, 18 Aug 2022 08:26:03 +0000 (17:26 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Thu, 18 Aug 2022 09:05:06 +0000 (18:05 +0900)
Change-Id: Ib4d3345dba45c8b3ce7c2276126d8efcdb54b725
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/tbm_server/tbm_server.c

index 0fd25cd..3ae411d 100644 (file)
@@ -179,10 +179,21 @@ tbm_client_buffer_iface_end_ptr_access(struct ds_buffer *ds_buffer)
     tbm_surface_unmap(buffer->surface);
 }
 
+static struct wl_resource *
+tbm_client_buffer_iface_get_resource(struct ds_buffer *ds_buffer)
+{
+    struct ds_tbm_client_buffer *buffer;
+
+    buffer = tbm_client_buffer_from_buffer(ds_buffer);
+
+    return buffer->resource;
+}
+
 static const struct ds_buffer_interface tbm_client_buffer_iface = {
     .destroy = tbm_client_buffer_iface_destroy,
     .begin_data_ptr_access = tbm_client_buffer_iface_begin_data_ptr_access,
     .end_data_ptr_access = tbm_client_buffer_iface_end_ptr_access,
+    .get_resource = tbm_client_buffer_iface_get_resource,
 };
 
 static struct ds_tbm_client_buffer *