Skip duplicated vertex binding
[platform/core/uifw/dali-core.git] / dali / internal / render / common / render-algorithms.cpp
index fac9fbe..13dfcc4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -24,6 +24,7 @@
 #include <dali/internal/render/common/render-list.h>
 #include <dali/internal/render/renderers/render-renderer.h>
 #include <dali/internal/update/nodes/scene-graph-layer.h>
+#include <dali/public-api/math/uint-16-pair.h>
 
 using Dali::Internal::SceneGraph::RenderInstruction;
 using Dali::Internal::SceneGraph::RenderItem;
@@ -501,7 +502,7 @@ inline void RenderAlgorithms::SetupClipping(const RenderItem&
                                             int                                 orientation)
 {
   RenderMode::Type renderMode = RenderMode::AUTO;
-  const Renderer*  renderer   = item.mRenderer;
+  RendererKey      renderer   = item.mRenderer;
   if(renderer)
   {
     renderMode = renderer->GetRenderMode();
@@ -642,6 +643,9 @@ inline void RenderAlgorithms::ProcessRenderList(const RenderList&
     mHasLayerScissor = true;
   }
 
+  // Prepare Render::Renderer Render for this secondary command buffer.
+  Renderer::PrepareCommandBuffer();
+
   // Loop through all RenderItems in the RenderList, set up any prerequisites to render them, then perform the render.
   for(uint32_t index = 0u; index < count; ++index)
   {