Merge "Added memory pool logging" into devel/master
[platform/core/uifw/dali-core.git] / dali / internal / render / common / render-instruction.h
index 93c8257..f8d24aa 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_SCENE_GRAPH_RENDER_INSTRUCTION_H
 
 /*
- * 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.
@@ -57,6 +57,10 @@ public:
    */
   ~RenderInstruction();
 
+  RenderInstruction(const RenderInstruction&) = delete;
+
+  RenderInstruction& operator=(const RenderInstruction& rhs) = delete;
+
   /**
    * Get the next free Renderlist
    * @param capacityRequired in this list
@@ -73,7 +77,7 @@ public:
   /**
    * @return the count of active Renderlists
    */
-  RenderListContainer::SizeType RenderListCount() const;
+  [[nodiscard]] RenderListContainer::SizeType RenderListCount() const;
 
   /**
    * Return the renderlist at given index
@@ -81,7 +85,7 @@ public:
    * @param index of list to return
    * @return pointer to the renderlist, or null if the index is out of bounds.
    */
-  const RenderList* GetRenderList(RenderListContainer::SizeType index) const;
+  [[nodiscard]] const RenderList* GetRenderList(RenderListContainer::SizeType index) const;
 
   /**
    * Reset render-instruction
@@ -103,7 +107,7 @@ public:
    * @param index of the rendering side
    * @return the view matrix
    */
-  const Matrix* GetViewMatrix(BufferIndex index) const
+  [[nodiscard]] const Matrix* GetViewMatrix(BufferIndex index) const
   {
     // inlined as this is called once per frame per render instruction
     return &mCamera->GetViewMatrix(index);
@@ -114,22 +118,21 @@ public:
    * @param index of the rendering side
    * @return the projection matrix
    */
-  const Matrix* GetProjectionMatrix(BufferIndex index) const
+  [[nodiscard]] const Matrix* GetProjectionMatrix(BufferIndex index) const
   {
     // inlined as this is called once per frame per render instruction
     return &mCamera->GetFinalProjectionMatrix(index);
   }
   // for reflection effect
-  const Camera* GetCamera() const
+  [[nodiscard]] const Camera* GetCamera() const
   {
     return mCamera;
   }
 
-private:
-  // Undefined
-  RenderInstruction(const RenderInstruction&);
-  // Undefined
-  RenderInstruction& operator=(const RenderInstruction& rhs);
+  /**
+   * Get the total memory usage of the render instruction
+   */
+  std::size_t GetCapacity();
 
 public:                                  // Data
   Render::RenderTracker* mRenderTracker; ///< Pointer to an optional tracker object (not owned)