}
//Adding VisibilityChange Signal.
- Dali::DevelActor::VisibilityChangedSignal(self).Connect(this, &GlView::OnControlVisibilityChanged);
+ self.InheritedVisibilityChangedSignal().Connect(this, &GlView::OnControlInheritedVisibilityChanged);
}
void GlView::OnSizeSet(const Vector3& targetSize)
return Shader::New(SHADER_GL_VIEW_VERT, fragmentShader, Shader::Hint::NONE, "GL_VIEW");
}
-void GlView::OnControlVisibilityChanged(Dali::Actor actor, bool visible, Dali::DevelActor::VisibilityChange::Type type)
+void GlView::OnControlInheritedVisibilityChanged(Dali::Actor actor, bool visible)
{
Actor self = Self();
- if(self.GetProperty<bool>(Actor::Property::CONNECTED_TO_SCENE))
+ if(mRenderThread)
{
- if(mRenderThread)
+ if(visible && DevelWindow::Get(self).IsVisible())
{
- if(visible && DevelWindow::Get(self).IsVisible())
- {
- mRenderThread->Resume();
- }
- else
- {
- mRenderThread->Pause();
- }
+ mRenderThread->Resume();
+ }
+ else
+ {
+ mRenderThread->Pause();
}
}
}
mPlacementWindow = window;
DevelWindow::VisibilityChangedSignal(window).Connect(this, &GlView::OnWindowVisibilityChanged);
}
-
- if(mRenderThread)
- {
- if(self.GetProperty<bool>(Actor::Property::VISIBLE) && window.IsVisible())
- {
- mRenderThread->Resume();
- }
- }
}
void GlView::OnSceneDisconnection()
{
Control::OnSceneDisconnection();
- if(mRenderThread)
- {
- mRenderThread->Pause();
- }
-
Window window = mPlacementWindow.GetHandle();
if(window)
{
GlView& operator=(const GlView& GlView);
/**
- * Callback when the visibility of the GlView is changed
+ * Callback when the inherited visibility of the GlView is changed
*/
- void OnControlVisibilityChanged(Dali::Actor actor, bool visible, Dali::DevelActor::VisibilityChange::Type type);
+ void OnControlInheritedVisibilityChanged(Dali::Actor actor, bool visible);
/**
* Callback when the visibility of the window is changed
mPlacementActor = actor;
PrepareTextureSet();
- DevelActor::VisibilityChangedSignal(actor).Connect(this, &AnimatedImageVisual::OnControlVisibilityChanged);
+ actor.InheritedVisibilityChangedSignal().Connect(this, &AnimatedImageVisual::OnControlInheritedVisibilityChanged);
Window window = DevelWindow::Get(actor);
if(window)
mCurrentFrameIndex = FIRST_FRAME_INDEX;
mCurrentLoopIndex = FIRST_LOOP;
- DevelActor::VisibilityChangedSignal(actor).Disconnect(this, &AnimatedImageVisual::OnControlVisibilityChanged);
+ actor.InheritedVisibilityChangedSignal().Disconnect(this, &AnimatedImageVisual::OnControlInheritedVisibilityChanged);
Window window = mPlacementWindow.GetHandle();
if(window)
}
}
-void AnimatedImageVisual::OnControlVisibilityChanged(Actor actor, bool visible, DevelActor::VisibilityChange::Type type)
+void AnimatedImageVisual::OnControlInheritedVisibilityChanged(Actor actor, bool visible)
{
if(!visible && mActionStatus != DevelAnimatedImageVisual::Action::STOP)
{
mActionStatus = DevelAnimatedImageVisual::Action::STOP;
DisplayNextFrame();
- DALI_LOG_INFO(gAnimImgLogFilter, Debug::Verbose, "AnimatedImageVisual::OnControlVisibilityChanged: invisibile. Pause animation [%p]\n", this);
+ DALI_LOG_INFO(gAnimImgLogFilter, Debug::Verbose, "AnimatedImageVisual::OnControlInheritedVisibilityChanged: invisibile. Pause animation [%p]\n", this);
}
}
void CheckMaskTexture();
/**
- * @brief Callback when the visibility of the actor is changed.
+ * @brief Callback when the inherited visibility of the actor is changed.
*/
- void OnControlVisibilityChanged(Actor actor, bool visible, DevelActor::VisibilityChange::Type type);
+ void OnControlInheritedVisibilityChanged(Actor actor, bool visible);
/**
* @brief Callback when the visibility of the window is changed.
mSizeNotification = actor.AddPropertyNotification(Actor::Property::SIZE, StepCondition(3.0f));
mSizeNotification.NotifySignal().Connect(this, &AnimatedVectorImageVisual::OnSizeNotification);
- DevelActor::VisibilityChangedSignal(actor).Connect(this, &AnimatedVectorImageVisual::OnControlVisibilityChanged);
+ actor.InheritedVisibilityChangedSignal().Connect(this, &AnimatedVectorImageVisual::OnControlInheritedVisibilityChanged);
Window window = DevelWindow::Get(actor);
if(window)
actor.RemovePropertyNotification(mScaleNotification);
actor.RemovePropertyNotification(mSizeNotification);
- DevelActor::VisibilityChangedSignal(actor).Disconnect(this, &AnimatedVectorImageVisual::OnControlVisibilityChanged);
+ actor.InheritedVisibilityChangedSignal().Disconnect(this, &AnimatedVectorImageVisual::OnControlInheritedVisibilityChanged);
Window window = mPlacementWindow.GetHandle();
if(window)
}
}
-void AnimatedVectorImageVisual::OnControlVisibilityChanged(Actor actor, bool visible, DevelActor::VisibilityChange::Type type)
+void AnimatedVectorImageVisual::OnControlInheritedVisibilityChanged(Actor actor, bool visible)
{
if(!visible)
{
StopAnimation();
TriggerVectorRasterization();
- DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnControlVisibilityChanged: invisibile. Pause animation [%p]\n", this);
+ DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnControlInheritedVisibilityChanged: invisibile. Pause animation [%p]\n", this);
}
}
/**
* @brief Callback when the visibility of the actor is changed.
*/
- void OnControlVisibilityChanged(Actor actor, bool visible, DevelActor::VisibilityChange::Type type);
+ void OnControlInheritedVisibilityChanged(Actor actor, bool visible);
/**
* @brief Callback when the visibility of the window is changed.