[Tizen] Implement partial update
[platform/core/uifw/dali-core.git] / dali / internal / update / manager / update-manager.cpp
old mode 100644 (file)
new mode 100755 (executable)
index ce5cfb8..4d1842e
@@ -426,6 +426,8 @@ void UpdateManager::ConnectNode( Node* parent, Node* node )
 
   parent->ConnectChild( node );
 
+  parent->SetPropertyDirty( true );
+
   // Inform the frame-callback-processor, if set, about the node-hierarchy changing
   if( mImpl->frameCallbackProcessor )
   {
@@ -633,6 +635,8 @@ void UpdateManager::RemoveRenderer( Renderer* renderer )
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "[%x] RemoveRenderer\n", renderer );
 
+  renderer->SetDirty( true );
+
   // Find the renderer and destroy it
   EraseUsingDiscardQueue( mImpl->renderers, renderer, mImpl->discardQueue, mSceneGraphBuffers.GetUpdateBufferIndex() );
   // Need to remove the render object as well
@@ -983,15 +987,6 @@ uint32_t UpdateManager::Update( float elapsedSeconds,
       DALI_LOG_INFO( gLogFilter, Debug::General,
                      "Update: numberOfRenderTasks(%d), Render Instructions(%d)\n",
                      numberOfRenderTasks, mImpl->renderInstructions.Count( bufferIndex ) );
-
-
-
-      // If any node is dirty, i.e. a property has changed or a child has been deleted, and we do not have any instructions to send, then generate a dummy instruction to force another render
-      if( ( mImpl->nodeDirtyFlags != NodePropertyFlags::NOTHING ) && ( mImpl->renderInstructions.Count( bufferIndex ) == 0 ) )
-      {
-        DALI_LOG_INFO( gLogFilter, Debug::General, "Node flags dirty, creating dummy instruction\n" );
-        mImpl->renderInstructions.GetNextInstruction( bufferIndex ); // This creates and adds an empty instruction. We do not need to modify it.
-      }
     }
   }
 
@@ -1112,6 +1107,17 @@ void UpdateManager::SetDefaultSurfaceRect( const Rect<int32_t>& rect )
   new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::SetDefaultSurfaceRect, rect );
 }
 
+void UpdateManager::SetDefaultSurfaceOrientation( int orientation )
+{
+  typedef MessageValue1< RenderManager, int > DerivedType;
+
+  // Reserve some memory inside the render queue
+  unsigned int* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
+
+  // Construct message in the render queue memory; note that delete should not be called on the return value
+  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::SetDefaultSurfaceOrientation, orientation );
+}
+
 void UpdateManager::KeepRendering( float durationSeconds )
 {
   mImpl->keepRenderingSeconds = std::max( mImpl->keepRenderingSeconds, durationSeconds );