Tizen 2.4.0 rev3 SDK Public Release
[framework/graphics/dali.git] / dali / internal / render / renderers / scene-graph-image-renderer.h
index 226501b..54da3dc 100644 (file)
@@ -69,6 +69,11 @@ public:
   virtual ~ImageRenderer();
 
   /**
+   * Called in the render-thread when the renderer is removed
+   */
+  void OnRemove();
+
+  /**
    * Set the texture used to render.
    * @param[in] textureId The id of the texture used to render.
    */
@@ -88,6 +93,24 @@ public:
   void SetNinePatchBorder( const Vector4& border, bool inPixels );
 
   /**
+   * Set whether the ImageRenderer should use blending
+   * @param[in] useBlend True if blending should be used.
+   */
+  void SetUseBlend( bool useBlend );
+
+  /**
+   * Set the blending options.
+   * @param[in] options A bitmask of blending options.
+   */
+  void SetBlendingOptions( unsigned int options );
+
+  /**
+   * Set the blend color.
+   * @param[in] color The new blend-color.
+   */
+  void SetBlendColor( const Vector4& color );
+
+  /**
    * Calculate the mesh data used by the ImageRenderer.
    * @param[in] type The type of mesh data required; either quad, nine-patch or grid.
    * @param[in] targetSize The size which the mesh data should fit inside.
@@ -125,6 +148,11 @@ public:
    */
   virtual void DoRender( Context& context, TextureCache& textureCache, BufferIndex bufferIndex, Program& program, const Matrix& modelViewMatrix, const Matrix& viewMatrix );
 
+  /**
+   * @copydoc Dali::Internal::SceneGraph::Renderer::DoSetBlending()
+   */
+  virtual void DoSetBlending( Context& context, BufferIndex bufferIndex );
+
 protected: // TextureObserver implementation
 
   /**
@@ -214,10 +242,13 @@ private:
   Vector2   mGeometrySize;
   ResourceId  mTextureId;
 
+  BlendingOptions mBlendingOptions;
+
   // flags
   MeshType  mMeshType        : 3; // 4 values fits in 3 bits just fine
   bool      mIsMeshGenerated : 1;
   bool      mBorderInPixels  : 1;
+  bool      mUseBlend        : 1; ///< True if blending should be enabled, 1 bit is enough
   bool      mUsePixelArea    : 1;
 
 };