X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fcolor%2Fcolor-visual.h;h=0a8a8b2d0280237895015b8352b5af31bab96224;hp=ba9a59000709bdfbd114420e6af5e54c54c0081b;hb=5a936aac073676657d48db5c42e5d2ad3f5cac9f;hpb=b8da2e53925b9abb9fa362560069e8ca4aa62f81 diff --git a/dali-toolkit/internal/visuals/color/color-visual.h b/dali-toolkit/internal/visuals/color/color-visual.h index ba9a590..0a8a8b2 100644 --- a/dali-toolkit/internal/visuals/color/color-visual.h +++ b/dali-toolkit/internal/visuals/color/color-visual.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_COLOR_VISUAL_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 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. @@ -65,6 +65,11 @@ public: // from Visual */ void DoCreateInstancePropertyMap(Property::Map& map) const override; + /** + * @copydoc Visual::Base::EnablePreMultipliedAlpha + */ + void EnablePreMultipliedAlpha(bool preMultiplied) override; + protected: /** * @brief Constructor. @@ -104,26 +109,27 @@ protected: void OnSetTransform() override; /** - * @copydoc Visual::Base::OnDoAction + * @copydoc Visual::Base::UpdateShader */ - void OnDoAction(const Property::Index actionId, const Property::Value& attributes) override; + void UpdateShader() override; /** - * @copydoc Visual::Base::UpdateShader + * @copydoc Visual::Base::GenerateShader */ - void UpdateShader() override; + Shader GenerateShader() const override; /** * @copydoc Visual::Base::OnGetPropertyObject */ Dali::Property OnGetPropertyObject(Dali::Property::Key key) override; -private: +protected: /** - * @brief Get a shader for the current properties. - * @return The shader for the current properties. + * @brief Query whether the visual requires to be blur. + * + * @return Returns true if the blur is required, false otherwise. */ - Shader GetShader(); + bool IsBlurRequired() const; private: // Undefined @@ -133,10 +139,8 @@ private: ColorVisual& operator=(const ColorVisual& colorRenderer); private: - float mBlurRadius; ///< The blur radius - Property::Index mBlurRadiusIndex; ///< The blur radius property index - bool mRenderIfTransparent; ///< Whether we should render even if the mix-color is transparent. - bool mNeedBlurRadius; ///< Whether we need the blur radius in shader. + float mBlurRadius; ///< The blur radius + bool mAlwaysUsingBlurRadius : 1; ///< Whether we need the blur radius in shader always. }; } // namespace Internal