Fix window rotation sync issue for multi window
Rotation_done_send() should be called after eglSwapbuffers.
For the sync, this patch has the connection of thread controller's lock.
Change-Id: Ice2575a6e86e2de80b816f6776afe9e3de7272ea
// Add the new Window to the container - the order is not important
mWindows.push_back( &windowImpl );
// Add the new Window to the container - the order is not important
mWindows.push_back( &windowImpl );
+ Dali::RenderSurfaceInterface* surface = windowImpl.GetSurface();
+
+ mThreadController->AddSurface( surface );
+
mWindowCreatedSignal.Emit( childWindow );
return true;
mWindowCreatedSignal.Emit( childWindow );
return true;
mPreRenderCallback = callback;
}
mPreRenderCallback = callback;
}
+void CombinedUpdateRenderController::AddSurface( Dali::RenderSurfaceInterface* surface )
+{
+ LOG_EVENT_TRACE;
+ LOG_EVENT( "Surface is added" );
+ if( mUpdateRenderThread )
+ {
+ // Set the ThreadSyncronizationInterface on the added surface
+ surface->SetThreadSynchronization( *this );
+ }
+}
+
///////////////////////////////////////////////////////////////////////////////////////////////////
// EVENT THREAD
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
// EVENT THREAD
///////////////////////////////////////////////////////////////////////////////////////////////////
*/
void SetPreRenderCallback( CallbackBase* callback ) override;
*/
void SetPreRenderCallback( CallbackBase* callback ) override;
+ /**
+ * @copydoc ThreadControllerInterface::AddSurface()
+ */
+ virtual void AddSurface( Dali::RenderSurfaceInterface* surface );
+
private:
// Undefined copy constructor.
private:
// Undefined copy constructor.
*/
virtual void SetPreRenderCallback( CallbackBase* callback ) = 0;
*/
virtual void SetPreRenderCallback( CallbackBase* callback ) = 0;
+ /**
+ * @brief Adds the new surface.
+ * @param surface new surface
+ */
+ virtual void AddSurface( Dali::RenderSurfaceInterface* surface ) = 0;
+
mThreadControllerInterface->SetPreRenderCallback( callback );
}
mThreadControllerInterface->SetPreRenderCallback( callback );
}
+void ThreadController::AddSurface( Dali::RenderSurfaceInterface* newSurface )
+{
+ mThreadControllerInterface->AddSurface( newSurface );
+}
+
} // namespace Adaptor
} // namespace Internal
} // namespace Adaptor
} // namespace Internal
*/
void SetPreRenderCallback( CallbackBase* callback );
*/
void SetPreRenderCallback( CallbackBase* callback );
+ /**
+ * @brief Adds the new surface.
+ *
+ * @param surface new surface
+ */
+ void AddSurface( Dali::RenderSurfaceInterface* surface );
+
private:
// Undefined copy constructor.
private:
// Undefined copy constructor.