Added memory pool logging
[platform/core/uifw/dali-core.git] / dali / integration-api / core.cpp
index 83cfedf..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.
@@ -20,8 +20,6 @@
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/events/event.h>
-#include <dali/integration-api/gl-context-helper-abstraction.h>
-#include <dali/integration-api/gl-sync-abstraction.h>
 #include <dali/integration-api/processor-interface.h>
 #include <dali/internal/common/core-impl.h>
 #include <dali/public-api/actors/layer.h>
@@ -32,22 +30,18 @@ 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* 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,
-                                       glAbstraction,
-                                       glSyncAbstraction,
-                                       glContextHelperAbstraction,
+                                       graphicsController,
                                        renderToFboEnabled,
                                        depthBufferAvailable,
                                        stencilBufferAvailable,
@@ -106,14 +100,14 @@ 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)
@@ -131,19 +125,19 @@ void Core::RenderScene(RenderStatus& status, Integration::Scene& scene, bool ren
   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
@@ -151,6 +145,11 @@ ObjectRegistry Core::GetObjectRegistry() const
   return ObjectRegistry(&mImpl->GetObjectRegistry());
 }
 
+void Core::LogMemoryPools() const
+{
+  mImpl->LogMemoryPools();
+}
+
 Core::Core()
 : mImpl(nullptr)
 {