Modified not to reload resource image on surface change 43/44943/3
authorsuhyung Eom <suhyung.eom@samsung.com>
Thu, 30 Jul 2015 02:40:39 +0000 (11:40 +0900)
committerSuhyung Eom <suhyung.eom@samsung.com>
Thu, 30 Jul 2015 10:03:47 +0000 (03:03 -0700)
(Reason: imageActor is blinking instantly on device rotation)
Signed-off-by: suhyung Eom <suhyung.eom@samsung.com>
Change-Id: If24322b354544eced059ddb5425f14008530348f

adaptors/common/adaptor-impl.cpp
adaptors/common/adaptor-impl.h

index 96b7a5c..fef4bdc 100644 (file)
@@ -365,6 +365,19 @@ void Adaptor::Stop()
   }
 }
 
+void Adaptor::ContextLost()
+{
+  mCore->GetContextNotifier()->NotifyContextLost(); // Inform stage
+}
+
+void Adaptor::ContextRegained()
+{
+  // Inform core, so that texture resources can be reloaded
+  mCore->RecoverFromContextLoss();
+
+  mCore->GetContextNotifier()->NotifyContextRegained(); // Inform stage
+}
+
 void Adaptor::FeedTouchPoint( TouchPoint& point, int timeStamp )
 {
   mEventHandler->FeedTouchPoint( point, timeStamp );
@@ -424,15 +437,8 @@ void Adaptor::ReplaceSurface( Any nativeWindow, RenderSurface& surface )
   // to start processing messages for new camera setup etc as soon as possible
   ProcessCoreEvents();
 
-  mCore->GetContextNotifier()->NotifyContextLost(); // Inform stage
-
   // this method blocks until the render thread has completed the replace.
   mUpdateRenderController->ReplaceSurface(mSurface);
-
-  // Inform core, so that texture resources can be reloaded
-  mCore->RecoverFromContextLoss();
-
-  mCore->GetContextNotifier()->NotifyContextRegained(); // Inform stage
 }
 
 RenderSurface& Adaptor::GetSurface() const
index 8f2bd9f..2e4ddb5 100644 (file)
@@ -159,6 +159,16 @@ public: // AdaptorInternalServices implementation
   virtual void Stop();
 
   /**
+   * @copydoc Dali::Adaptor::ContextLost()
+   */
+  virtual void ContextLost();
+
+  /**
+   * @copydoc Dali::Adaptor::ContextRegained()
+   */
+  virtual void ContextRegained();
+
+  /**
    * @copydoc Dali::EventFeeder::FeedTouchPoint()
    */
   virtual void FeedTouchPoint( TouchPoint& point, int timeStamp );