Added memory pool logging
[platform/core/uifw/dali-core.git] / dali / integration-api / core.cpp
index ecac451..870861b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
 #include <dali/integration-api/core.h>
 
 // INTERNAL INCLUDES
-#include <dali/public-api/common/dali-common.h>
-#include <dali/public-api/actors/layer.h>
-#include <dali/public-api/render-tasks/render-task-list.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/processor-interface.h>
 #include <dali/internal/common/core-impl.h>
+#include <dali/public-api/actors/layer.h>
+#include <dali/public-api/common/dali-common.h>
+#include <dali/public-api/render-tasks/render-task-list.h>
 
 namespace Dali
 {
-
 namespace Integration
 {
-
-Core* Core::New( RenderController& renderController,
-                 PlatformAbstraction& platformAbstraction,
-                 GlAbstraction& glAbstraction,
-                 GlSyncAbstraction& glSyncAbstraction,
-                 GlContextHelperAbstraction& glContextHelperAbstraction,
-                 RenderToFrameBuffer renderToFboEnabled,
-                 DepthBufferAvailable depthBufferAvailable,
-                 StencilBufferAvailable stencilBufferAvailable,
-                 PartialUpdateAvailable partialUpdateAvailable )
-{
-  Core* instance = new Core;
-  instance->mImpl = new Internal::Core( renderController,
-                                        platformAbstraction,
-                                        glAbstraction,
-                                        glSyncAbstraction,
-                                        glContextHelperAbstraction,
-                                        renderToFboEnabled,
-                                        depthBufferAvailable,
-                                        stencilBufferAvailable,
-                                        partialUpdateAvailable );
+Core* Core::New(RenderController&      renderController,
+                PlatformAbstraction&   platformAbstraction,
+                Graphics::Controller&  graphicsController,
+                RenderToFrameBuffer    renderToFboEnabled,
+                DepthBufferAvailable   depthBufferAvailable,
+                StencilBufferAvailable stencilBufferAvailable,
+                PartialUpdateAvailable partialUpdateAvailable)
+{
+  Core* instance  = new Core;
+  instance->mImpl = new Internal::Core(renderController,
+                                       platformAbstraction,
+                                       graphicsController,
+                                       renderToFboEnabled,
+                                       depthBufferAvailable,
+                                       stencilBufferAvailable,
+                                       partialUpdateAvailable);
 
   return instance;
 }
@@ -108,53 +100,58 @@ uint32_t Core::GetMaximumUpdateCount() const
   return mImpl->GetMaximumUpdateCount();
 }
 
-void Core::Update( float elapsedSeconds, uint32_t lastVSyncTimeMilliseconds, uint32_t nextVSyncTimeMilliseconds, UpdateStatus& status, bool renderToFboEnabled, bool isRenderingToFbo )
+void Core::Update(float elapsedSeconds, uint32_t lastVSyncTimeMilliseconds, uint32_t nextVSyncTimeMilliseconds, UpdateStatus& status, bool renderToFboEnabled, bool isRenderingToFbo, bool uploadOnly)
 {
-  mImpl->Update( elapsedSeconds, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds, status, renderToFboEnabled, isRenderingToFbo );
+  mImpl->Update(elapsedSeconds, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds, status, renderToFboEnabled, isRenderingToFbo, uploadOnly);
 }
 
-void Core::PreRender( RenderStatus& status, bool forceClear, bool uploadOnly )
+void Core::PreRender(RenderStatus& status, bool forceClear)
 {
-  mImpl->PreRender( status, forceClear, uploadOnly );
+  mImpl->PreRender(status, forceClear);
 }
 
-void Core::PreRender( Integration::Scene& scene, std::vector<Rect<int>>& damagedRects )
+void Core::PreRender(Integration::Scene& scene, std::vector<Rect<int>>& damagedRects)
 {
-  mImpl->PreRender( scene, damagedRects );
+  mImpl->PreRender(scene, damagedRects);
 }
 
-void Core::RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo )
+void Core::RenderScene(RenderStatus& status, Integration::Scene& scene, bool renderToFbo)
 {
-  mImpl->RenderScene( status, scene, renderToFbo );
+  mImpl->RenderScene(status, scene, renderToFbo);
 }
 
-void Core::RenderScene( RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect<int>& clippingRect )
+void Core::RenderScene(RenderStatus& status, Integration::Scene& scene, bool renderToFbo, Rect<int>& clippingRect)
 {
-  mImpl->RenderScene( status, scene, renderToFbo, clippingRect );
+  mImpl->RenderScene(status, scene, renderToFbo, clippingRect);
 }
 
-void Core::PostRender( bool uploadOnly )
+void Core::PostRender()
 {
-  mImpl->PostRender( uploadOnly );
+  mImpl->PostRender();
 }
 
-void Core::RegisterProcessor( Processor& processor )
+void Core::RegisterProcessor(Processor& processor, bool postProcessor)
 {
-  mImpl->RegisterProcessor( processor );
+  mImpl->RegisterProcessor(processor, postProcessor);
 }
 
-void Core::UnregisterProcessor( Processor& processor )
+void Core::UnregisterProcessor(Processor& processor, bool postProcessor)
 {
-  mImpl->UnregisterProcessor( processor );
+  mImpl->UnregisterProcessor(processor, postProcessor);
 }
 
 ObjectRegistry Core::GetObjectRegistry() const
 {
-  return ObjectRegistry( &mImpl->GetObjectRegistry() );
+  return ObjectRegistry(&mImpl->GetObjectRegistry());
+}
+
+void Core::LogMemoryPools() const
+{
+  mImpl->LogMemoryPools();
 }
 
 Core::Core()
-: mImpl( nullptr )
+: mImpl(nullptr)
 {
 }