Implement no_render_push feature
authorhyunho <hhstark.kang@samsung.com>
Mon, 3 Feb 2020 07:14:47 +0000 (16:14 +0900)
committerhyunho <hhstark.kang@samsung.com>
Mon, 3 Feb 2020 07:14:47 +0000 (16:14 +0900)
Resume request will stop rendering until the viewer receive the buffer
from provider or timeout occurred.

Signed-off-by: hyunho <hhstark.kang@samsung.com>
watch-holder/src/watch.cc
watch-holder/src/watch.hh

index c329df6..bfd95b5 100644 (file)
@@ -33,14 +33,16 @@ Watch::Watch(string appid, Evas_Object* viewer_win, Watch::IEvent* listener)
     : RemoteSurfaceEvas(appid, RemoteSurface::WATCH,
         make_shared<screen_connector::EvasObject>(viewer_win, false)),
         appid_(appid), listener_(listener) {
+    RemoteSurfaceEvas::SetAutoVisibility(false);
 }
 
 void Watch::Resume() {
-  SendVisibility(true);
+  RemoteSurfaceEvas::NoRenderPush(200);
+  RemoteSurfaceEvas::SendVisibility(true);
 }
 
 void Watch::Pause() {
-  SendVisibility(false);
+  RemoteSurfaceEvas::SendVisibility(false);
 }
 
 void Watch::Terminate() {
@@ -65,6 +67,10 @@ int Watch::GetRid() const {
   return RemoteSurface::GetRid();
 }
 
+int Watch::GetPid() const {
+  return pid_;
+}
+
 void Watch::Bind(Evas_Object* win) {
   bind_win_ = win;
   elm_win_aux_hint_add(win, "wm.policy.win.msg.use", "1");
index 2d71deb..8bf2464 100644 (file)
@@ -46,7 +46,7 @@ class EXPORT_API Watch : private screen_connector::RemoteSurfaceEvas {
   void NotifyChangedEvent();
   bool IsBound();
   std::string GetAppId();
-  int GetPid();
+  int GetPid() const ;
   int GetRid() const ;
   tizen_base::Bundle GetExtra();
   bool IsFaulted();