Added a RendererCache and utilise it for ImageRenderer.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / renderers / gradient / gradient-renderer.h
index e35b5db..deed3aa 100644 (file)
@@ -72,9 +72,20 @@ class GradientRenderer: public ControlRenderer
 public:
 
   /**
+   * Types of the gradient
+   */
+  enum Type
+  {
+    LINEAR,
+    RADIAL
+  };
+
+  /**
    * @brief Constructor.
+   *
+   * @param[in] factoryCache A pointer pointing to the RendererFactoryCache object
    */
-  GradientRenderer();
+  GradientRenderer( RendererFactoryCache& factoryCache );
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -84,11 +95,6 @@ public:
 public:  // from ControlRenderer
 
   /**
-   * @copydoc ControlRenderer::Initialize
-   */
-  virtual void Initialize( RendererFactoryCache& factoryCache, const Property::Map& propertyMap );
-
-  /**
    * @copydoc ControlRenderer::SetSize
    */
   virtual void SetSize( const Vector2& size );
@@ -106,24 +112,20 @@ public:  // from ControlRenderer
   /**
    * @copydoc ControlRenderer::CreatePropertyMap
    */
-  virtual void CreatePropertyMap( Property::Map& map ) const;
+  virtual void DoCreatePropertyMap( Property::Map& map ) const;
 
 protected:
   /**
-   * @copydoc ControlRenderer::DoSetOnStage
+   * @copydoc ControlRenderer::DoInitialize
    */
-  virtual void DoSetOnStage( Actor& actor );
-
-private:
+  virtual void DoInitialize( const Property::Map& propertyMap );
 
   /**
-   * Types of the gradient
+   * @copydoc ControlRenderer::InitializeRenderer
    */
-  enum Type
-  {
-    LINEAR,
-    RADIAL
-  };
+  virtual void InitializeRenderer( Renderer& renderer );
+
+private:
 
   /**
    * New a gradient object with the given property map.
@@ -150,8 +152,8 @@ private:
 private:
 
   Matrix3 mGradientTransform;
-  Property::Index mGradientTransformIndex;
   IntrusivePtr<Gradient> mGradient;
+  Type mGradientType;
 };
 
 } // namespace Internal