[Tizen] Implement partial update
[platform/core/uifw/dali-core.git] / dali / internal / common / core-impl.cpp
old mode 100644 (file)
new mode 100755 (executable)
index 7412b9a..4c62b13
@@ -23,6 +23,7 @@
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/events/event.h>
 #include <dali/integration-api/gl-sync-abstraction.h>
+#include <dali/integration-api/gl-context-helper-abstraction.h>
 #include <dali/integration-api/platform-abstraction.h>
 #include <dali/integration-api/processor-interface.h>
 #include <dali/integration-api/render-controller.h>
@@ -75,6 +76,7 @@ using Integration::RenderController;
 using Integration::PlatformAbstraction;
 using Integration::GlSyncAbstraction;
 using Integration::GlAbstraction;
+using Integration::GlContextHelperAbstraction;
 using Integration::Event;
 using Integration::UpdateStatus;
 using Integration::RenderStatus;
@@ -83,10 +85,12 @@ Core::Core( RenderController& renderController,
             PlatformAbstraction& platform,
             GlAbstraction& glAbstraction,
             GlSyncAbstraction& glSyncAbstraction,
+            GlContextHelperAbstraction& glContextHelperAbstraction,
             ResourcePolicy::DataRetention dataRetentionPolicy,
             Integration::RenderToFrameBuffer renderToFboEnabled,
             Integration::DepthBufferAvailable depthBufferAvailable,
-            Integration::StencilBufferAvailable stencilBufferAvailable )
+            Integration::StencilBufferAvailable stencilBufferAvailable,
+            Integration::PartialUpdateAvailable partialUpdateAvailable )
 : mRenderController( renderController ),
   mPlatform(platform),
   mProcessingEvent(false),
@@ -106,7 +110,7 @@ Core::Core( RenderController& renderController,
 
   mRenderTaskProcessor = new SceneGraph::RenderTaskProcessor();
 
-  mRenderManager = RenderManager::New( glAbstraction, glSyncAbstraction, depthBufferAvailable, stencilBufferAvailable );
+  mRenderManager = RenderManager::New( glAbstraction, glSyncAbstraction, glContextHelperAbstraction, depthBufferAvailable, stencilBufferAvailable, partialUpdateAvailable );
 
   RenderQueue& renderQueue = mRenderManager->GetRenderQueue();
 
@@ -119,7 +123,8 @@ Core::Core( RenderController& renderController,
                                        renderController,
                                       *mRenderManager,
                                        renderQueue,
-                                      *mRenderTaskProcessor );
+                                      *mRenderTaskProcessor,
+                                       partialUpdateAvailable == Integration::PartialUpdateAvailable::TRUE );
 
   mRenderManager->SetShaderSaver( *mUpdateManager );
 
@@ -191,17 +196,6 @@ void Core::ContextDestroyed()
   mRenderManager->ContextDestroyed();
 }
 
-void Core::SurfaceResized( Integration::RenderSurface* surface, bool forceUpdate )
-{
-  for( auto iter = mScenes.begin(); iter != mScenes.end(); ++iter )
-  {
-    if( (*iter)->GetSurface() == surface )
-    {
-      (*iter)->SurfaceResized( forceUpdate );
-    }
-  }
-}
-
 void Core::SurfaceDeleted( Integration::RenderSurface* surface )
 {
   for( auto scene : mScenes )
@@ -238,9 +232,9 @@ void Core::Update( float elapsedSeconds, uint32_t lastVSyncTimeMilliseconds, uin
   // Any message to update will wake it up anyways
 }
 
-void Core::Render( RenderStatus& status, bool forceClear )
+void Core::Render( RenderStatus& status, bool forceClear, bool uploadOnly )
 {
-  mRenderManager->Render( status, forceClear );
+  mRenderManager->Render( status, forceClear, uploadOnly );
 }
 
 void Core::SceneCreated()