mSizeNotification = actor.AddPropertyNotification( Actor::Property::SIZE, StepCondition( 3.0f ) );
mSizeNotification.NotifySignal().Connect( this, &AnimatedVectorImageVisual::OnSizeNotification );
+ DevelActor::VisibilityChangedSignal( actor ).Connect( this, &AnimatedVectorImageVisual::OnVisibilityChanged );
+
DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::DoSetOnStage [%p]\n", this );
}
actor.RemovePropertyNotification( mScaleNotification );
actor.RemovePropertyNotification( mSizeNotification );
+ DevelActor::VisibilityChangedSignal( actor ).Connect( this, &AnimatedVectorImageVisual::OnVisibilityChanged );
+
mPlacementActor.Reset();
// Reset the visual size to zero so that when adding the actor back to stage the rasterization is forced
}
}
+void AnimatedVectorImageVisual::OnVisibilityChanged( Actor actor, bool visible, DevelActor::VisibilityChange::Type type )
+{
+ if( !visible )
+ {
+ if( mActionStatus == DevelAnimatedVectorImageVisual::Action::PLAY )
+ {
+ mVectorAnimationTask->PauseAnimation();
+
+ if( mImpl->mRenderer )
+ {
+ mImpl->mRenderer.SetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::IF_REQUIRED );
+ }
+
+ mActionStatus = DevelAnimatedVectorImageVisual::Action::PAUSE;
+
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnVisibilityChanged: invisibile. Pause animation [%p]\n", this );
+ }
+ }
+}
+
} // namespace Internal
} // namespace Toolkit