Add ApplyCustomFragmentPrefix
[platform/core/uifw/dali-core.git] / dali / internal / event / rendering / texture-set-impl.h
index eb692b9..b88d7d7 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_TEXTURE_SET_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
 #include <dali/public-api/common/vector-wrapper.h> // std::vector
 
 // INTERNAL INCLUDES
-#include <dali/public-api/common/dali-common.h> // DALI_ASSERT_ALWAYS
-#include <dali/public-api/common/intrusive-ptr.h> // Dali::IntrusivePtr
-#include <dali/public-api/rendering/texture-set.h> // Dali::TextureSet
-#include <dali/internal/event/common/object-impl.h> // Dali::Internal::Object
-#include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
+#include <dali/internal/event/common/object-impl.h>     // Dali::Internal::Object
 #include <dali/internal/event/rendering/sampler-impl.h> // Dali::Internal::Sampler
+#include <dali/internal/event/rendering/shader-impl.h>  // Dali::Internal::Shader
 #include <dali/internal/event/rendering/texture-impl.h> // Dali::Internal::Texture
-#include <dali/internal/event/rendering/shader-impl.h> // Dali::Internal::Shader
+#include <dali/public-api/common/dali-common.h>         // DALI_ASSERT_ALWAYS
+#include <dali/public-api/common/intrusive-ptr.h>       // Dali::IntrusivePtr
+#include <dali/public-api/rendering/texture-set.h>      // Dali::TextureSet
 
 namespace Dali
 {
@@ -40,9 +39,8 @@ namespace SceneGraph
 class TextureSet;
 }
 
-
 class TextureSet;
-typedef IntrusivePtr<TextureSet> TextureSetPtr;
+using TextureSetPtr = IntrusivePtr<TextureSet>;
 
 /**
  * TextureSet is an object that holds all the textures used by a renderer
@@ -50,7 +48,6 @@ typedef IntrusivePtr<TextureSet> TextureSetPtr;
 class TextureSet : public BaseObject
 {
 public:
-
   /**
    * @copydoc Dali::TextureSet::New()
    */
@@ -59,29 +56,29 @@ public:
   /**
    * @copydoc Dali::TextureSet::SetTexture()
    */
-  void SetTexture( size_t index, TexturePtr texture );
+  void SetTexture(uint32_t index, TexturePtr texture);
 
   /**
    * @copydoc Dali::TextureSet::GetTexture()
    */
-  Texture* GetTexture( size_t index ) const;
+  Texture* GetTexture(uint32_t index) const;
 
   /**
    * @copydoc Dali::TextureSet::SetSampler()
    */
-  void SetSampler( size_t index, SamplerPtr sampler );
+  void SetSampler(uint32_t index, SamplerPtr sampler);
 
   /**
    * @copydoc Dali::TextureSet::GetSampler()
    */
-  Sampler* GetSampler( size_t index ) const;
+  Sampler* GetSampler(uint32_t index) const;
 
   /**
    * @copydoc Dali::TextureSet::GetTextureCount()
    */
-  size_t GetTextureCount() const;
+  uint32_t GetTextureCount() const;
 
- /**
 /**
    * @brief Get the TextureSet scene object
    *
    * @return the texture set scene object
@@ -89,7 +86,6 @@ public:
   const SceneGraph::TextureSet* GetTextureSetSceneObject() const;
 
 private: // implementation
-
   TextureSet();
 
   /**
@@ -101,14 +97,14 @@ protected:
   /**
    * A reference counted object may only be deleted by calling Unreference()
    */
-  virtual ~TextureSet();
+  ~TextureSet() override;
 
 private: // unimplemented methods
-  TextureSet( const TextureSet& );
-  TextureSet& operator=( const TextureSet& );
+  TextureSet(const TextureSet&);
+  TextureSet& operator=(const TextureSet&);
 
-private: // Data
-  EventThreadServices& mEventThreadServices;    ///<Used to send messages to the update thread
+private:                                        // Data
+  EventThreadServices&    mEventThreadServices; ///<Used to send messages to the update thread
   SceneGraph::TextureSet* mSceneObject;
   std::vector<SamplerPtr> mSamplers;
   std::vector<TexturePtr> mTextures;
@@ -117,7 +113,7 @@ private: // Data
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
-inline Internal::TextureSet& GetImplementation( Dali::TextureSet& handle )
+inline Internal::TextureSet& GetImplementation(Dali::TextureSet& handle)
 {
   DALI_ASSERT_ALWAYS(handle && "TextureSet handle is empty");
 
@@ -126,7 +122,7 @@ inline Internal::TextureSet& GetImplementation( Dali::TextureSet& handle )
   return static_cast<Internal::TextureSet&>(object);
 }
 
-inline const Internal::TextureSet& GetImplementation( const Dali::TextureSet& handle )
+inline const Internal::TextureSet& GetImplementation(const Dali::TextureSet& handle)
 {
   DALI_ASSERT_ALWAYS(handle && "TextureSet handle is empty");