Added memory pool logging
[platform/core/uifw/dali-core.git] / dali / internal / render / common / render-instruction-container.cpp
index 6ae3c5b..37900ed 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 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.
@@ -62,6 +62,17 @@ void RenderInstructionContainer::PushBack(BufferIndex bufferIndex, RenderInstruc
   mInstructions.push_back(renderInstruction);
 }
 
+std::size_t RenderInstructionContainer::GetCapacity() const
+{
+  std::size_t capacity{0};
+  for(auto& el : mInstructions)
+  {
+    capacity += el->GetCapacity();
+  }
+  capacity += mInstructions.size() * sizeof(RenderInstruction*);
+  return capacity;
+}
+
 } // namespace SceneGraph
 
 } // namespace Internal