Use modern construct 'using' instead of typedef.
[platform/core/uifw/dali-core.git] / dali / internal / update / manager / render-instruction-processor.h
index d864b90..9040982 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_SCENE_GRAPH_RENDER_INSTRUCTION_PROCESSOR_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -21,7 +21,6 @@
 // INTERNAL INCLUDES
 #include <dali/internal/common/buffer-index.h>
 #include <dali/internal/update/manager/sorted-layers.h>
-#include <dali/integration-api/resource-declarations.h>
 #include <dali/public-api/common/dali-vector.h>
 
 namespace Dali
@@ -41,7 +40,6 @@ namespace SceneGraph
 class RenderTracker;
 struct RenderItem;
 class Shader;
-class GeometryBatcher;
 struct RenderList;
 class RenderTask;
 class RenderInstructionContainer;
@@ -73,7 +71,7 @@ public:
     SortAttributes()
     : renderItem( NULL ),
       shader( NULL ),
-      textureResourceId( Integration::InvalidResourceId ),
+      textureSet( NULL ),
       geometry( NULL ),
       zValue( 0.0f )
     {
@@ -81,7 +79,7 @@ public:
 
     RenderItem*             renderItem;        ///< The render item that is being sorted (includes depth index)
     const Shader*           shader;            ///< The shader instance
-    Integration::ResourceId textureResourceId; ///< The first texture resource ID of the texture set instance, is InvalidResourceId if the texture set doesn't have any textures
+    const void*             textureSet;        ///< The textureSet instance
     const Render::Geometry* geometry;          ///< The geometry instance
     float                   zValue;            ///< The Z value of the given renderer (either distance from camera, or a custom calculated value)
   };
@@ -92,7 +90,7 @@ public:
    * Whilst iterating through each layer, update the RenderItems ModelView matrices
    *
    * The opaque and transparent render lists are sorted first by depth
-   * index, then by Z (for transparent only), then by shader, texture
+   * index, then by Z (for transparent only), then by shader
    * and geometry. The render algorithm should then work through both
    * lists simultaneously, working through opaque then transparent
    * items at each depth index, resetting the flags appropriately.
@@ -101,7 +99,6 @@ public:
    * @param[in]  sortedLayers      The layers containing lists of opaque/transparent renderables.
    * @param[in]  renderTask        The rendering task information.
    * @param[in]  cull              Whether frustum culling is enabled or not
-   * @param[in]  geometryBatcher   The instance of the geometry batcher
    * @param[in]  hasClippingNodes  Whether any clipping nodes exist within this layer, to optimize sorting if not
    * @param[out] instructions      The rendering instructions for the next frame.
    */
@@ -109,7 +106,6 @@ public:
                 SortedLayerPointers& sortedLayers,
                 RenderTask& renderTask,
                 bool cull,
-                GeometryBatcher& geometryBatcher,
                 bool hasClippingNodes,
                 RenderInstructionContainer& instructions );
 
@@ -133,8 +129,9 @@ private:
   inline void SortRenderItems( BufferIndex bufferIndex, RenderList& renderList, Layer& layer, bool respectClippingOrder );
 
   /// Sort comparitor function pointer type.
-  typedef bool ( *ComparitorPointer )( const SortAttributes& lhs, const SortAttributes& rhs );
-  typedef std::vector< SortAttributes > SortingHelper;
+  using ComparitorPointer = bool ( * )( const SortAttributes&, const SortAttributes& );
+
+  using SortingHelper = std::vector<SortAttributes>;
 
   Dali::Vector< ComparitorPointer > mSortComparitors;       ///< Contains all sort comparitors, used for quick look-up
   RenderInstructionProcessor::SortingHelper mSortingHelper; ///< Helper used to sort Renderers