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.cpp;h=593eeb696aad1e01506eacaad0f55c635e15736a;hp=8f748cfa5b3d88b79f3e63b39292a6fea204aea9;hb=abf5d9bb2bc8c3db867355573bdf8c27389dcf23;hpb=0547e874c936c6837e6e4511a7715cf555b0fb68 diff --git a/dali-toolkit/internal/visuals/color/color-visual.cpp b/dali-toolkit/internal/visuals/color/color-visual.cpp index 8f748cf..593eeb6 100644 --- a/dali-toolkit/internal/visuals/color/color-visual.cpp +++ b/dali-toolkit/internal/visuals/color/color-visual.cpp @@ -72,7 +72,7 @@ ColorVisual::ColorVisual(VisualFactoryCache& factoryCache) : Visual::Base(factoryCache, Visual::FittingMode::FILL, Toolkit::Visual::COLOR), mBlurRadius(0.0f), mBlurRadiusIndex(Property::INVALID_INDEX), - mNeedBlurRadius(false) + mAlwaysUsingBlurRadius(false) { } @@ -182,7 +182,7 @@ void ColorVisual::UpdateShader() { if(mImpl->mRenderer) { - Shader shader = GetShader(); + Shader shader = GenerateShader(); mImpl->mRenderer.SetShader(shader); } } @@ -191,7 +191,7 @@ void ColorVisual::OnInitialize() { Geometry geometry = mFactoryCache.GetGeometry(VisualFactoryCache::QUAD_GEOMETRY); - Shader shader = GetShader(); + Shader shader = GenerateShader(); mImpl->mRenderer = Renderer::New(geometry, shader); @@ -210,14 +210,14 @@ void ColorVisual::OnInitialize() mImpl->mTransform.RegisterUniforms(mImpl->mRenderer, Direction::LEFT_TO_RIGHT); } -Shader ColorVisual::GetShader() +Shader ColorVisual::GenerateShader() const { Shader shader; VisualFactoryCache::ShaderType shaderType; bool roundedCorner = IsRoundedCornerRequired(); bool borderline = IsBorderlineRequired(); - bool blur = !EqualsZero(mBlurRadius) || mNeedBlurRadius; + bool blur = !EqualsZero(mBlurRadius) || mAlwaysUsingBlurRadius; int shaderTypeFlag = ColorVisualRequireFlag::DEFAULT; if(roundedCorner) @@ -276,9 +276,10 @@ Dali::Property ColorVisual::OnGetPropertyObject(Dali::Property::Key key) { mBlurRadiusIndex = mImpl->mRenderer.RegisterProperty(DevelColorVisual::Property::BLUR_RADIUS, BLUR_RADIUS_NAME, mBlurRadius); - mImpl->mRenderer.SetProperty(Renderer::Property::BLEND_MODE, BlendMode::ON); + // Blur is animated now. we always have to use blur feature. + mAlwaysUsingBlurRadius = true; - mNeedBlurRadius = true; + mImpl->mRenderer.SetProperty(Renderer::Property::BLEND_MODE, BlendMode::ON); // Change shader UpdateShader();