Revert "[Tizen] Implement partial update"
[platform/core/uifw/dali-core.git] / dali / internal / update / rendering / scene-graph-texture-set.h
index fdb52a5..c850b3c 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_SCENE_GRAPH_TEXTURE_SET_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -47,9 +47,9 @@ public:
   static TextureSet* New();
 
   /**
-   * Destructor
+   * Destructor. Not virtual as not a base class and not inheriting anything
    */
-  virtual ~TextureSet();
+  ~TextureSet();
 
   /**
    * Overriden delete operator
@@ -62,14 +62,14 @@ public:
    * @param[in] index The index of the texture
    * @param[in] sampler The sampler to be used by the texture
    */
-  void SetSampler( size_t index, Render::Sampler* sampler );
+  void SetSampler( uint32_t index, Render::Sampler* sampler );
 
   /**
    * Set the texture at position "index"
    * @param[in] index The index of the texture
    * @param[in] texture The texture
    */
-  void SetTexture( size_t index, Render::Texture* texture );
+  void SetTexture( uint32_t index, Render::Texture* texture );
 
   /**
    * Return whether any texture in the texture set has an alpha channel
@@ -97,7 +97,7 @@ public:
    * @param[in] index The index of the texture in the textures array
    * @return the sampler used by the texture
    */
-  Render::Sampler* GetTextureSampler( size_t index )
+  Render::Sampler* GetTextureSampler( uint32_t index )
   {
     return mSamplers[index];
   }
@@ -106,9 +106,9 @@ public:
    * Get the number of Textures in the texture set
    * @return The number of Textures
    */
-  size_t GetTextureCount()
+  uint32_t GetTextureCount()
   {
-    return mTextures.Size();
+    return static_cast<uint32_t>( mTextures.Size() );
   }
 
   /**
@@ -116,7 +116,7 @@ public:
    * @param[in] index The index of the texture in the textures array
    * @return the pointer to the Texture in that position
    */
-  Render::Texture* GetTexture( size_t index )
+  Render::Texture* GetTexture( uint32_t index )
   {
     return mTextures[index];
   }
@@ -136,29 +136,29 @@ private:
 
 private: // Data
 
-  Vector< Render::Sampler* >      mSamplers;                    ///< List of samplers used by each texture. Not owned
-  Vector< Render::Texture* >   mTextures;                    ///< List of Textures. Not owned
-  Vector<Renderer*>               mRenderers;                   ///< List of renderers using the TextureSet
-  bool                            mHasAlpha;                    ///< if any of the textures has an alpha channel
+  Vector< Render::Sampler* > mSamplers;                    ///< List of samplers used by each texture. Not owned
+  Vector< Render::Texture* > mTextures;                    ///< List of Textures. Not owned
+  Vector<Renderer*>          mRenderers;                   ///< List of renderers using the TextureSet
+  bool                       mHasAlpha;                    ///< if any of the textures has an alpha channel
 };
 
-inline void SetTextureMessage( EventThreadServices& eventThreadServices, const TextureSet& textureSet, size_t index, Render::Texture* texture )
+inline void SetTextureMessage( EventThreadServices& eventThreadServices, const TextureSet& textureSet, uint32_t index, Render::Texture* texture )
 {
-  typedef MessageValue2< TextureSet, size_t, Render::Texture* > LocalType;
+  typedef MessageValue2< TextureSet, uint32_t, Render::Texture* > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
+  uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
   new (slot) LocalType( &textureSet, &TextureSet::SetTexture, index, texture );
 }
 
-inline void SetSamplerMessage( EventThreadServices& eventThreadServices, const TextureSet& textureSet, size_t index, Render::Sampler* sampler )
+inline void SetSamplerMessage( EventThreadServices& eventThreadServices, const TextureSet& textureSet, uint32_t index, Render::Sampler* sampler )
 {
-  typedef MessageValue2< TextureSet, size_t, Render::Sampler* > LocalType;
+  typedef MessageValue2< TextureSet, uint32_t, Render::Sampler* > LocalType;
 
   // Reserve some memory inside the message queue
-  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
+  uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
   new (slot) LocalType( &textureSet, &TextureSet::SetSampler, index, sampler );