Making DALi core internals typesafe using guaranteed types; uint8_t, uint32_t
[platform/core/uifw/dali-core.git] / dali / internal / render / renderers / render-renderer.h
old mode 100644 (file)
new mode 100755 (executable)
index 6e1a1f7..1f8d99e
@@ -82,11 +82,11 @@ public:
     int stencilFunctionMask;                          ///< The stencil function mask
     int stencilFunctionReference;                     ///< The stencil function reference
     int stencilMask;                                  ///< The stencil mask
-    RenderMode::Type       renderMode:3;              ///< The render mode
-    StencilFunction::Type  stencilFunction:3;         ///< The stencil function
-    StencilOperation::Type stencilOperationOnFail:3;  ///< The stencil operation for stencil test fail
-    StencilOperation::Type stencilOperationOnZFail:3; ///< The stencil operation for depth test fail
-    StencilOperation::Type stencilOperationOnZPass:3; ///< The stencil operation for depth test pass
+    RenderMode::Type       renderMode:4;              ///< The render mode
+    StencilFunction::Type  stencilFunction:4;         ///< The stencil function
+    StencilOperation::Type stencilOperationOnFail:4;  ///< The stencil operation for stencil test fail
+    StencilOperation::Type stencilOperationOnZFail:4; ///< The stencil operation for depth test fail
+    StencilOperation::Type stencilOperationOnZPass:4; ///< The stencil operation for depth test pass
   };
 
   /**
@@ -114,7 +114,7 @@ public:
    */
   static Renderer* New( SceneGraph::RenderDataProvider* dataProviders,
                         Render::Geometry* geometry,
-                        unsigned int blendingBitmask,
+                        uint32_t blendingBitmask,
                         const Vector4& blendColor,
                         FaceCullingMode::Type faceCullingMode,
                         bool preMultipliedAlphaEnabled,
@@ -138,7 +138,7 @@ public:
    */
   Renderer( SceneGraph::RenderDataProvider* dataProviders,
             Render::Geometry* geometry,
-            unsigned int blendingBitmask,
+            uint32_t blendingBitmask,
             const Vector4& blendColor,
             FaceCullingMode::Type faceCullingMode,
             bool preMultipliedAlphaEnabled,
@@ -175,7 +175,7 @@ public:
    * Set the bitmask for blending options
    * @param[in] bitmask A bitmask of blending options.
    */
-  void SetBlendingBitMask( unsigned int bitmask );
+  void SetBlendingBitMask( uint32_t bitmask );
 
   /**
    * Set the blend color for blending options
@@ -187,13 +187,13 @@ public:
    * Set the first element index to draw by the indexed draw
    * @param[in] firstElement index of first element to draw
    */
-  void SetIndexedDrawFirstElement( size_t firstElement );
+  void SetIndexedDrawFirstElement( uint32_t firstElement );
 
   /**
    * Set the number of elements to draw by the indexed draw
    * @param[in] elementsCount number of elements to draw
    */
-  void SetIndexedDrawElementsCount( size_t elementsCount );
+  void SetIndexedDrawElementsCount( uint32_t elementsCount );
 
   /**
    * @brief Set whether the Pre-multiplied Alpha Blending is required
@@ -414,7 +414,7 @@ private:
 
   struct UniformIndexMap
   {
-    unsigned int               uniformIndex;                ///< The index of the cached location in the Program
+    uint32_t                   uniformIndex;                ///< The index of the cached location in the Program
     const PropertyInputImpl*   propertyValue;
   };
 
@@ -426,13 +426,13 @@ private:
   StencilParameters            mStencilParameters;          ///< Struct containing all stencil related options
   BlendingOptions              mBlendingOptions;            ///< Blending options including blend color, blend func and blend equation
 
-  size_t                       mIndexedDrawFirstElement;    ///< Offset of first element to draw
-  size_t                       mIndexedDrawElementsCount;   ///< Number of elements to draw
+  uint32_t                     mIndexedDrawFirstElement;    ///< Offset of first element to draw
+  uint32_t                     mIndexedDrawElementsCount;   ///< Number of elements to draw
 
-  DepthFunction::Type          mDepthFunction:3;            ///< The depth function
-  FaceCullingMode::Type        mFaceCullingMode:2;          ///< The mode of face culling
-  DepthWriteMode::Type         mDepthWriteMode:2;           ///< The depth write mode
-  DepthTestMode::Type          mDepthTestMode:2;            ///< The depth test mode
+  DepthFunction::Type          mDepthFunction:4;            ///< The depth function
+  FaceCullingMode::Type        mFaceCullingMode:3;          ///< The mode of face culling
+  DepthWriteMode::Type         mDepthWriteMode:3;           ///< The depth write mode
+  DepthTestMode::Type          mDepthTestMode:3;            ///< The depth test mode
   bool                         mUpdateAttributesLocation:1; ///< Indicates attribute locations have changed
   bool                         mPremultipledAlphaEnabled:1; ///< Flag indicating whether the Pre-multiplied Alpha Blending is required