summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunho Kang <hhstark.kang@samsung.com>2017-01-17 10:00:29 +0900
committerHyunho Kang <hhstark.kang@samsung.com>2017-01-17 10:05:43 +0900
commit7d2b2c27ba0d30a951c26802a7412d8c3a563ef0 (patch)
tree0ff99aebcecd942b3c29d27354e0d05459152444
parent3fd02474299527b3b60eda271590a3445d6ac822 (diff)
downloadscreen-connector-7d2b2c27ba0d30a951c26802a7412d8c3a563ef0.tar.gz
screen-connector-7d2b2c27ba0d30a951c26802a7412d8c3a563ef0.tar.bz2
screen-connector-7d2b2c27ba0d30a951c26802a7412d8c3a563ef0.zip
Add tizen remote surface buffer changed callback
tizen remote surface version up to 3. Change-Id: I1e4b5fab125903ac7b63c8a1a97314accb576380 Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
-rw-r--r--screen_connector_watcher/src/screen_connector_watcher.c7
-rw-r--r--screen_connector_watcher_evas/src/screen_connector_watcher_evas.c6
2 files changed, 3 insertions, 10 deletions
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)