X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Fwearable%2Fwatch-application-impl.cpp;h=dd5b00441119161da74a770d5654b968119e76ac;hb=fb4c93d425ef24838ccd10d69adb1e423ffac7cd;hp=2f47a33d1fcddd28ba2f85dfa8b25f6a0b2afef3;hpb=13a89dfbeb961e9f3b5e9701290b1c0eac0e86ff;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/wearable/watch-application-impl.cpp b/adaptors/wearable/watch-application-impl.cpp old mode 100644 new mode 100755 index 2f47a33..dd5b004 --- a/adaptors/wearable/watch-application-impl.cpp +++ b/adaptors/wearable/watch-application-impl.cpp @@ -46,16 +46,62 @@ WatchApplication::~WatchApplication() { } +void WatchApplication::OnInit() +{ + Application::OnInit(); + + Dali::Adaptor::Get().SetRenderRefreshRate( 2 ); // make 30 fps for watch applications + + mState = INITIALIZED; +} + +void WatchApplication::OnTerminate() +{ + Application::OnTerminate(); + + mState = TERMINATED; +} + +void WatchApplication::OnResume() +{ + Application::OnResume(); + + mState = RESUMED; +} + +void WatchApplication::OnPause() +{ + Application::OnPause(); + + mState = PAUSED; +} + void WatchApplication::OnTimeTick(WatchTime& time) { Dali::WatchApplication watch(this); mTickSignal.Emit( watch, time ); + + if(mState == PAUSED) + { + // This is a pre-resume scenario. All rendering engine of tizen SHOULD forcely update once at this time. + Internal::Adaptor::Adaptor::GetImplementation( GetAdaptor() ).RequestUpdateOnce(); + } + + // A watch application will queue messages to update the UI in the signal emitted above + // Process these immediately to avoid a blinking issue where the old time is briefly visible + CoreEventInterface& eventInterface = Internal::Adaptor::Adaptor::GetImplementation( GetAdaptor() ); + eventInterface.ProcessCoreEvents(); } void WatchApplication::OnAmbientTick(WatchTime& time) { Dali::WatchApplication watch(this); mAmbientTickSignal.Emit( watch, time ); + + // A watch application will queue messages to update the UI in the signal emitted above + // Process these immediately to avoid a blinking issue where the old time is briefly visible + CoreEventInterface& eventInterface = Internal::Adaptor::Adaptor::GetImplementation( GetAdaptor() ); + eventInterface.ProcessCoreEvents(); } void WatchApplication::OnAmbientChanged(bool ambient)