X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Frenderers%2Fcontrol-renderer-impl.h;h=3880b0b167ea4f76f30a653a410e704fb0fc91d2;hb=refs%2Fchanges%2F16%2F75316%2F15;hp=10a13dc7e76fe79b23e65280eacd7501888fbb97;hpb=3a21dc6b7c0c8e199c075d367ffd9574fde752f3;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/renderers/control-renderer-impl.h b/dali-toolkit/internal/controls/renderers/control-renderer-impl.h index 10a13dc..3880b0b 100644 --- a/dali-toolkit/internal/controls/renderers/control-renderer-impl.h +++ b/dali-toolkit/internal/controls/renderers/control-renderer-impl.h @@ -45,18 +45,18 @@ namespace Internal * * The following properties are optional * - * | %Property Name | Type | - * |---------------------------|------------------| - * | custom-shader | MAP | + * | %Property Name | Type | + * |-------------------------|------------------| + * | customShader | MAP | * * where custom-shader is a map with the following properties: - * | %Property Name | Type | - * |---------------------------|------------------| - * | vertex-shader | STRING | - * | fragment-shader | STRING | - * | subdivide-grid-x | INT | - * | subdivide-grid-y | INT | - * | shader-hints | INT | + * | %Property Name | Type | + * |-------------------------|------------------| + * | vertexShader | STRING | + * | fragmentShader | STRING | + * | subdivideGridX | INT | + * | subdivideGridY | INT | + * | shaderHints | INT | */ class ControlRenderer : public BaseObject { @@ -67,9 +67,10 @@ public: * request the geometry and shader from the cache, if not available, create and save to the cache for sharing; * record the property values. * + * @param[in] actor The Actor the renderer is applied to if, empty if the renderer has not been applied to any Actor * @param[in] propertyMap The properties for the requested ControlRenderer object. */ - void Initialize( const Property::Map& propertyMap ); + void Initialize( Actor& actor, const Property::Map& propertyMap ); /** * @copydoc Toolkit::ControlRenderer::SetSize @@ -131,6 +132,26 @@ public: */ void CreatePropertyMap( Property::Map& map ) const; + /** + * @brief Set whether the Pre-multiplied Alpha Blending is required + * + * @param[in] preMultipled whether alpha is pre-multiplied. + */ + void EnablePreMultipliedAlpha( bool preMultipled ); + + /** + * @brief Query whether alpha is pre-multiplied. + * + * @return True is alpha is pre-multiplied, false otherwise. + */ + bool IsPreMultipliedAlphaEnabled() const; + + /** + * @brief Sets properties of custom shader + * @param[in] propertyMap Property map containing the custom shader data + */ + void SetCustomShader( const Property::Map& propertyMap ); + protected: /** @@ -156,17 +177,10 @@ protected: /** * @brief Called by Initialize() allowing sub classes to respond to the Initialize event * - * @param[in] factoryCache A pointer pointing to the RendererFactoryCache object + * @param[in] actor The Actor the renderer is applied to if, empty if the renderer has not been applied to any Actor * @param[in] propertyMap The properties for the requested ControlRenderer object. */ - virtual void DoInitialize( const Property::Map& propertyMap ) = 0; - - /** - * @brief Initialises a renderer ready to be put on stage. - * - * @param[inout] renderer The Renderer to initialise. If the renderer is not empty then re-initialise the renderer - */ - virtual void InitializeRenderer( Renderer& renderer ) = 0; + virtual void DoInitialize( Actor& actor, const Property::Map& propertyMap ) {}; protected: @@ -185,13 +199,19 @@ protected: virtual void DoSetOffStage( Actor& actor ); protected: + /** + * @brief Gets the on stage state for this ControlRenderer + * + * @return Returns true if this ControlRenderer is on stage, false if it is off the stage + */ + bool GetIsOnStage() const; /** - * @brief Sets the key to use for caching the renderer. If this is empty then no caching will occur + * @brief Gets whether the Dali::Renderer is from a shared cache (and therefore any modifications will affect other users of that renderer) * - * @param[in] cachedRendererKey The key to use for caching the renderer. + * @return Returns true if the renderer is from shared cache, false otherwise */ - void SetCachedRendererKey( const std::string& cachedRendererKey ); + bool GetIsFromCache() const; private: