(Indicator) Skip updating when indicator is not showing 31/24131/1
authorSinjae Lee <sinjae4b.lee@samsung.com>
Sat, 21 Jun 2014 12:21:29 +0000 (21:21 +0900)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 8 Jul 2014 15:59:07 +0000 (16:59 +0100)
[problem] Dali render once by indicator updating even indicator is not showing
[cause] Calls RequestUpdateOnce() for every indicator update signal
[solution] Check mIsShowing before updating

Change-Id: Ie03395aba8baf1764189f5d5f8df4ff2624ea199
Signed-off-by: Adeel Kazmi <adeel.kazmi@samsung.com>
adaptors/tizen/internal/common/indicator-impl.cpp

index e5400ad..8a481a1 100644 (file)
@@ -907,11 +907,15 @@ void Indicator::UpdateImageData()
   {
     if(mPixmap == 0)
     {
+      // in case of shm indicator (not pixmap), not sure we can skip it when mIsShowing is false
       CopyToBuffer();
     }
     else
     {
-      mAdaptor->RequestUpdateOnce();
+      if(mIsShowing)
+      {
+        mAdaptor->RequestUpdateOnce();
+      }
     }
   }
 }
@@ -1053,7 +1057,7 @@ void Indicator::DataReceived( void* event )
   {
     case OP_UPDATE:
       DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "Indicator client received: OP_UPDATE\n" );
-      if(mPixmap != 0)
+      if(mPixmap != 0 && mIsShowing)
       {
         mAdaptor->RequestUpdateOnce();
       }