[Tizen] Call RequestUpdateOnce in OnTimeTick 19/179119/2 submit/tizen_4.0/20180516.064454
authorHeeyong Song <heeyong.song@samsung.com>
Wed, 16 May 2018 02:27:00 +0000 (11:27 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Wed, 16 May 2018 04:01:11 +0000 (13:01 +0900)
The watch application needs to render again at the first time tick after pause

Change-Id: Id490293e6548ab119463e72da4b518c850241e33

adaptors/wearable/watch-application-impl.cpp
adaptors/wearable/watch-application-impl.h

index 0c89bfc..11f4d0e 100755 (executable)
@@ -40,7 +40,8 @@ WatchApplicationPtr WatchApplication::New(
 
 WatchApplication::WatchApplication( int* argc, char** argv[], const std::string& stylesheet, Dali::Application::WINDOW_MODE windowMode )
 : Application(argc, argv, stylesheet, windowMode, PositionSize(), Framework::WATCH),
-  mState( UNINITIALIZED )
+  mState( UNINITIALIZED ),
+  mNeedForceRender( false )
 {
   Dali::StyleMonitor::Get().SetIgnoreGlobalFontSizeChange(1);
 }
@@ -70,6 +71,7 @@ void WatchApplication::OnResume()
   Application::OnResume();
 
   mState = RESUMED;
+  mNeedForceRender = true;
 }
 
 void WatchApplication::OnPause()
@@ -77,6 +79,7 @@ void WatchApplication::OnPause()
   Application::OnPause();
 
   mState = PAUSED;
+  mNeedForceRender = true;
 }
 
 void WatchApplication::OnTimeTick(WatchTime& time)
@@ -84,10 +87,11 @@ void WatchApplication::OnTimeTick(WatchTime& time)
   Dali::WatchApplication watch(this);
   mTickSignal.Emit( watch, time );
 
-  if(mState == PAUSED)
+  if( mNeedForceRender )
   {
     // This is a pre-resume scenario. All rendering engine of tizen SHOULD forcely update once at this time.
     Internal::Adaptor::Adaptor::GetImplementation( GetAdaptor() ).RequestUpdateOnce();
+    mNeedForceRender = false;
   }
 
   // A watch application will queue messages to update the UI in the signal emitted above
index 9c162b4..4ee644e 100755 (executable)
@@ -128,6 +128,7 @@ public:
 
 private:
   WatchApplicationState                  mState;
+  bool                                   mNeedForceRender;
 };
 
 inline WatchApplication& GetImplementation(Dali::WatchApplication& watch)