use modern construct 'nullptr' instead of 'NULL' or '0'
[platform/core/uifw/dali-core.git] / dali / integration-api / core.cpp
index 1f664e4..ecac451 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
 
 // CLASS HEADER
 #include <dali/integration-api/core.h>
-#include <dali/integration-api/render-surface.h>
 
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
@@ -40,10 +39,10 @@ Core* Core::New( RenderController& renderController,
                  GlAbstraction& glAbstraction,
                  GlSyncAbstraction& glSyncAbstraction,
                  GlContextHelperAbstraction& glContextHelperAbstraction,
-                 ResourcePolicy::DataRetention policy,
                  RenderToFrameBuffer renderToFboEnabled,
                  DepthBufferAvailable depthBufferAvailable,
-                 StencilBufferAvailable stencilBufferAvailable )
+                 StencilBufferAvailable stencilBufferAvailable,
+                 PartialUpdateAvailable partialUpdateAvailable )
 {
   Core* instance = new Core;
   instance->mImpl = new Internal::Core( renderController,
@@ -51,10 +50,10 @@ Core* Core::New( RenderController& renderController,
                                         glAbstraction,
                                         glSyncAbstraction,
                                         glContextHelperAbstraction,
-                                        policy,
                                         renderToFboEnabled,
                                         depthBufferAvailable,
-                                        stencilBufferAvailable );
+                                        stencilBufferAvailable,
+                                        partialUpdateAvailable );
 
   return instance;
 }
@@ -89,11 +88,6 @@ void Core::RecoverFromContextLoss()
   mImpl->RecoverFromContextLoss();
 }
 
-void Core::SurfaceDeleted( Integration::RenderSurface* surface )
-{
-  mImpl->SurfaceDeleted(surface);
-}
-
 void Core::SceneCreated()
 {
   mImpl->SceneCreated();
@@ -119,9 +113,29 @@ void Core::Update( float elapsedSeconds, uint32_t lastVSyncTimeMilliseconds, uin
   mImpl->Update( elapsedSeconds, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds, status, renderToFboEnabled, isRenderingToFbo );
 }
 
-void Core::Render( RenderStatus& status, bool forceClear )
+void Core::PreRender( RenderStatus& status, bool forceClear, bool uploadOnly )
+{
+  mImpl->PreRender( status, forceClear, uploadOnly );
+}
+
+void Core::PreRender( Integration::Scene& scene, std::vector<Rect<int>>& damagedRects )
+{
+  mImpl->PreRender( scene, damagedRects );
+}
+
+void Core::RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo )
 {
-  mImpl->Render( status, forceClear );
+  mImpl->RenderScene( status, scene, renderToFbo );
+}
+
+void Core::RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect<int>& clippingRect )
+{
+  mImpl->RenderScene( status, scene, renderToFbo, clippingRect );
+}
+
+void Core::PostRender( bool uploadOnly )
+{
+  mImpl->PostRender( uploadOnly );
 }
 
 void Core::RegisterProcessor( Processor& processor )
@@ -134,8 +148,13 @@ void Core::UnregisterProcessor( Processor& processor )
   mImpl->UnregisterProcessor( processor );
 }
 
+ObjectRegistry Core::GetObjectRegistry() const
+{
+  return ObjectRegistry( &mImpl->GetObjectRegistry() );
+}
+
 Core::Core()
-: mImpl( NULL )
+: mImpl( nullptr )
 {
 }