mPlayState( DevelImageVisual::PlayState::STOPPED ),
mEventCallback( nullptr ),
mRendererAdded( false ),
- mCoreShutdown(false)
+ mCoreShutdown(false),
+ mRedrawInScalingDown(true)
{
// the rasterized image is with pre-multiplied alpha format
mImpl->mFlags |= Impl::IS_PREMULTIPLIED_ALPHA;
map.Insert( Toolkit::DevelImageVisual::Property::STOP_BEHAVIOR, mAnimationData.stopBehavior );
map.Insert( Toolkit::DevelImageVisual::Property::LOOPING_MODE, mAnimationData.loopingMode );
+ map.Insert( Toolkit::DevelImageVisual::Property::REDRAW_IN_SCALING_DOWN, mRedrawInScalingDown );
Property::Map layerInfo;
mVectorAnimationTask->GetLayerInfo( layerInfo );
{
DoSetProperty( Toolkit::DevelImageVisual::Property::LOOPING_MODE, keyValue.second );
}
+ else if( keyValue.first == REDRAW_IN_SCALING_DOWN_NAME )
+ {
+ DoSetProperty( Toolkit::DevelImageVisual::Property::REDRAW_IN_SCALING_DOWN, keyValue.second );
+ }
}
}
}
break;
}
+ case Toolkit::DevelImageVisual::Property::REDRAW_IN_SCALING_DOWN:
+ {
+ bool redraw;
+ if( value.Get( redraw ) )
+ {
+ mRedrawInScalingDown = redraw;
+ }
+ break;
+ }
}
}
if( mImpl->mCustomShader )
{
- shader = Shader::New( mImpl->mCustomShader->mVertexShader.empty() ? mImageVisualShaderFactory.GetVertexShaderSource() : mImpl->mCustomShader->mVertexShader,
- mImpl->mCustomShader->mFragmentShader.empty() ? mImageVisualShaderFactory.GetFragmentShaderSource() : mImpl->mCustomShader->mFragmentShader,
+ shader = Shader::New( mImpl->mCustomShader->mVertexShader.empty() ? mImageVisualShaderFactory.GetVertexShaderSource().data() : mImpl->mCustomShader->mVertexShader,
+ mImpl->mCustomShader->mFragmentShader.empty() ? mImageVisualShaderFactory.GetFragmentShaderSource().data() : mImpl->mCustomShader->mFragmentShader,
mImpl->mCustomShader->mHints );
shader.RegisterProperty( PIXEL_AREA_UNIFORM_NAME, FULL_TEXTURE_RECT );
if( actor )
{
Vector3 scale = actor.GetProperty< Vector3 >( Actor::Property::WORLD_SCALE );
- mVisualScale.width = scale.width;
- mVisualScale.height = scale.height;
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnScaleNotification: scale = %f, %f [%p]\n", mVisualScale.width, mVisualScale.height, this );
+ if(mRedrawInScalingDown || scale.width >= 1.0f || scale.height >= 1.0f)
+ {
+ mVisualScale.width = scale.width;
+ mVisualScale.height = scale.height;
- SetVectorImageSize();
- SendAnimationData();
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnScaleNotification: scale = %f, %f [%p]\n", mVisualScale.width, mVisualScale.height, this );
- Stage::GetCurrent().KeepRendering( 0.0f ); // Trigger event processing
+ SetVectorImageSize();
+ SendAnimationData();
+
+ Stage::GetCurrent().KeepRendering( 0.0f ); // Trigger event processing
+ }
}
}