tizen_remote_surface version up 87/105687/2 accepted/tizen/3.0/common/20161221.181006 accepted/tizen/3.0/ivi/20161221.010045 accepted/tizen/3.0/mobile/20161221.010230 accepted/tizen/3.0/tv/20161221.005900 accepted/tizen/3.0/wearable/20161221.005956 submit/tizen_3.0/20161220.014437
authorHyunho Kang <hhstark.kang@samsung.com>
Mon, 19 Dec 2016 07:37:05 +0000 (16:37 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Tue, 20 Dec 2016 01:27:38 +0000 (10:27 +0900)
tizen_remote_surface manager version 1 has bug.
tizen_remote_surface_release protocol is added.

Change-Id: I23e4d6533451b78e2c88e0ab330d2af3485581f4
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
screen_connector_watcher/src/screen_connector_watcher.c
screen_connector_watcher_evas/src/screen_connector_watcher_evas.c

index 02210c6..acf1e07 100644 (file)
@@ -178,7 +178,8 @@ EXPORT_API int screen_connector_watcher_init()
        EINA_INLIST_FOREACH(globals, global) {
                if (!strcmp(global->interface, "tizen_remote_surface_manager")) {
                        __rsm = wl_registry_bind(registry, global->id,
-                               &tizen_remote_surface_manager_interface, 1);
+                               &tizen_remote_surface_manager_interface,
+                               global->version < 2 ? global->version : 2);
                }
        }
 
index 8f36025..3bfebd0 100644 (file)
@@ -43,6 +43,7 @@ struct _screen_connector_watcher_evas_h {
        bool cancel_touch;
        Evas_Object *img_tbm;
        Evas_Object *img_file;
+       struct wl_buffer *pre_buffer;
        void *data;
 };
 static Evas_Object *__viewer_win;
@@ -313,6 +314,7 @@ static void __watcher_change_cb(struct tizen_remote_surface *trs, uint32_t type,
        watcher_evas_h = (screen_connector_watcher_evas_h)data;
        appid = screen_connector_watcher_get_appid(watcher_evas_h->watcher_h);
        pid = screen_connector_watcher_get_pid(watcher_evas_h->watcher_h);
+
        if (watcher_evas_h->img_tbm == NULL)    {
 
                LOGD("first added !!!! %d, %d %s", (watcher_evas_h->img_tbm == NULL), type, appid);
@@ -391,6 +393,13 @@ static void __watcher_change_cb(struct tizen_remote_surface *trs, uint32_t type,
                evas_object_image_native_surface_set(watcher_evas_h->img_tbm, NULL); /* set null to previous object for the tbm type */
        }
 
+       if (watcher_evas_h->pre_buffer) {
+               if (tizen_remote_surface_get_version(trs) >= TIZEN_REMOTE_SURFACE_RELEASE_SINCE_VERSION)
+                       tizen_remote_surface_release(trs, watcher_evas_h->pre_buffer);
+       }
+       watcher_evas_h->pre_buffer = tbm;
+
+
        if (is_added) {
                LOGD("call added !!!! %s", appid);
                watcher_evas_h->ops->added(appid, watcher_evas_h->img_tbm,