+void AnimatedVectorImageVisual::OnControlVisibilityChanged(Actor actor, bool visible, DevelActor::VisibilityChange::Type type)
+{
+ if(!visible)
+ {
+ StopAnimation();
+ TriggerVectorRasterization();
+
+ DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnControlVisibilityChanged: invisibile. Pause animation [%p]\n", this);
+ }
+}
+
+void AnimatedVectorImageVisual::OnWindowVisibilityChanged(Window window, bool visible)
+{
+ if(!visible)
+ {
+ StopAnimation();
+ TriggerVectorRasterization();
+
+ DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnWindowVisibilityChanged: invisibile. Pause animation [%p]\n", this);
+ }
+}
+
+void AnimatedVectorImageVisual::OnProcessEvents()
+{
+ SendAnimationData();
+
+ mEventCallback = nullptr; // The callback will be deleted in the VectorAnimationManager
+}
+
+Shader AnimatedVectorImageVisual::GenerateShader() const
+{
+ Shader shader;
+ if(mImpl->mCustomShader)
+ {
+ 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);
+ }
+ else
+ {
+ shader = mImageVisualShaderFactory.GetShader(
+ mFactoryCache,
+ TextureAtlas::DISABLED,
+ DefaultTextureWrapMode::APPLY,
+ IsRoundedCornerRequired() ? RoundedCorner::ENABLED : RoundedCorner::DISABLED,
+ IsBorderlineRequired() ? Borderline::ENABLED : Borderline::DISABLED
+ );