From: Hyunho Kang Date: Tue, 17 Jan 2017 01:00:29 +0000 (+0900) Subject: Add tizen remote surface buffer changed callback X-Git-Tag: accepted/tizen/3.0/common/20170119.105554~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d2b2c27ba0d30a951c26802a7412d8c3a563ef0;p=platform%2Fcore%2Fappfw%2Fscreen-connector.git Add tizen remote surface buffer changed callback tizen remote surface version up to 3. Change-Id: I1e4b5fab125903ac7b63c8a1a97314accb576380 Signed-off-by: Hyunho Kang --- diff --git a/screen_connector_watcher/src/screen_connector_watcher.c b/screen_connector_watcher/src/screen_connector_watcher.c index c1bcfb1..9077d76 100644 --- a/screen_connector_watcher/src/screen_connector_watcher.c +++ b/screen_connector_watcher/src/screen_connector_watcher.c @@ -71,7 +71,6 @@ static void __buffer_missing(void *data, struct tizen_remote_surface *trs) watcher_h->missing_cb(trs, watcher_h->data); } -#if 0 static void __buffer_changed(void *data, struct tizen_remote_surface *trs, uint32_t type, struct wl_buffer *tbm, int32_t img_file_fd, uint32_t img_file_size, uint32_t time, struct wl_array *keys) { @@ -86,12 +85,6 @@ static const struct tizen_remote_surface_listener __rs_listener = { __buffer_missing, __buffer_changed, }; -#else -static const struct tizen_remote_surface_listener __rs_listener = { - __buffer_updated, - __buffer_missing, -}; -#endif static void __app_removed(const char *appid, const int pid, void *data) { diff --git a/screen_connector_watcher_evas/src/screen_connector_watcher_evas.c b/screen_connector_watcher_evas/src/screen_connector_watcher_evas.c index 4cb233e..a690fff 100644 --- a/screen_connector_watcher_evas/src/screen_connector_watcher_evas.c +++ b/screen_connector_watcher_evas/src/screen_connector_watcher_evas.c @@ -357,7 +357,7 @@ static void __watcher_change_cb(struct tizen_remote_surface *trs, uint32_t type, } /* check type of given buffer */ - if (type == 0) { + if (type == TIZEN_REMOTE_SURFACE_BUFFER_TYPE_TBM) { /* get tbm surface from buffer */ tbm_surface = wl_buffer_get_user_data(tbm); width = tbm_surface_get_width(tbm_surface); @@ -372,7 +372,7 @@ static void __watcher_change_cb(struct tizen_remote_surface *trs, uint32_t type, evas_object_image_size_set(watcher_evas_h->img_tbm, width, height); evas_object_image_native_surface_set(watcher_evas_h->img_tbm, &ns); /* set native surface */ evas_object_image_pixels_dirty_set(watcher_evas_h->img_tbm, EINA_TRUE); /* set dirty for image updating */ - } else if (type == 1) { + } else if (type == TIZEN_REMOTE_SURFACE_BUFFER_TYPE_IMAGE_FILE) { if (!watcher_evas_h->img_file) watcher_evas_h->img_file = evas_object_image_filled_add(evas_object_evas_get(__viewer_win)); @@ -406,7 +406,7 @@ static void __watcher_change_cb(struct tizen_remote_surface *trs, uint32_t type, static void __watcher_update_cb(struct tizen_remote_surface *trs, struct wl_buffer *buffer, uint32_t time, void *data) { - __watcher_change_cb(trs, 0, buffer, 0, 0, 0, NULL, data); + __watcher_change_cb(trs, TIZEN_REMOTE_SURFACE_BUFFER_TYPE_TBM, buffer, 0, 0, 0, NULL, data); } static void __free_watcher_evas_h(screen_connector_watcher_evas_h watcher_evas_h)