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=31e0c55257e8f7c7ca4dba11022c26924349283f;hp=73b0931dc2d786f63ef9e9d5ac7ba2e9e1def382;hb=48000ec3ab1ca2d1f8001d192112e32357bb1dfc;hpb=73a1ce303089b6e535ddecc82d9b051384c0fb0c diff --git a/dali-toolkit/internal/visuals/color/color-visual.cpp b/dali-toolkit/internal/visuals/color/color-visual.cpp index 73b0931..31e0c55 100644 --- a/dali-toolkit/internal/visuals/color/color-visual.cpp +++ b/dali-toolkit/internal/visuals/color/color-visual.cpp @@ -23,6 +23,7 @@ #include //INTERNAL INCLUDES +#include #include #include #include @@ -113,6 +114,27 @@ void ColorVisual::DoSetProperties(const Property::Map& propertyMap) { DALI_LOG_ERROR("ColorVisual:DoSetProperties:: BLUR_RADIUS property has incorrect type: %d\n", blurRadiusValue->GetType()); } + + if(mBlurRadiusIndex != Property::INVALID_INDEX) + { + mImpl->mRenderer.SetProperty(mBlurRadiusIndex, mBlurRadius); + } + else if(DALI_UNLIKELY(mImpl->mRenderer && (!EqualsZero(mBlurRadius) || mAlwaysUsingBlurRadius))) + { + // Unusual case. SetProperty called after OnInitialize(). + // Assume that DoAction call UPDATE_PROPERTY. + // We must regist properies into renderer, and update shader. + + // BlurRadius added by this action. Regist property to renderer. + mBlurRadiusIndex = mImpl->mRenderer.RegisterProperty(DevelColorVisual::Property::BLUR_RADIUS, BLUR_RADIUS_NAME, mBlurRadius); + mImpl->mRenderer.SetProperty(Renderer::Property::BLEND_MODE, BlendMode::ON); + + // Change the shader must not be occured many times. we always have to use blur feature. + mAlwaysUsingBlurRadius = true; + + // Change shader + UpdateShader(); + } } }