X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fanimated-vector-image%2Fanimated-vector-image-visual.h;h=78848d0d5cf491152503499a0f142dfe017af8e2;hp=7aaff566c34bdf57b88391c9fc3e137835c248cb;hb=f5829e20b7d09df9fd925b928818737e2cd22e1e;hpb=fedd5ae8da46cd798f730fd07c942df853e055dd diff --git a/dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.h b/dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.h index 7aaff56..78848d0 100644 --- a/dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.h +++ b/dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.h @@ -21,12 +21,14 @@ // EXTERNAL INCLUDES #include #include -#include +#include +#include // INTERNAL INCLUDES #include #include #include +#include namespace Dali { @@ -38,7 +40,6 @@ namespace Internal { class ImageVisualShaderFactory; -class VectorRasterizeThread; class AnimatedVectorImageVisual; using AnimatedVectorImageVisualPtr = IntrusivePtr< AnimatedVectorImageVisual >; @@ -53,7 +54,7 @@ using AnimatedVectorImageVisualPtr = IntrusivePtr< AnimatedVectorImageVisual >; * | url | STRING | * */ -class AnimatedVectorImageVisual: public Visual::Base +class AnimatedVectorImageVisual: public Visual::Base, public ConnectionTracker { public: @@ -146,15 +147,40 @@ private: void DoSetProperty( Property::Index index, const Property::Value& value ); /** - * @brief Event callback from rasterize thread. This is called after the first frame is ready. + * @brief Called when the texture upload is completed. */ - void OnResourceReady(); + void OnUploadCompleted(); /** * @brief Event callback from rasterize thread. This is called after the animation is finished. */ void OnAnimationFinished(); + /** + * @brief Send animation data to the rasterize thread. + */ + void SendAnimationData(); + + /** + * @brief Set the vector image size. + */ + void SetVectorImageSize(); + + /** + * @brief Callback when the world scale factor changes. + */ + void OnScaleNotification( PropertyNotification& source ); + + /** + * @brief Callback when the size changes. + */ + void OnSizeNotification( PropertyNotification& source ); + + /** + * @brief Callback when the visibility of the actor is changed. + */ + void OnVisibilityChanged( Actor actor, bool visible, DevelActor::VisibilityChange::Type type ); + // Undefined AnimatedVectorImageVisual( const AnimatedVectorImageVisual& visual ) = delete; @@ -162,15 +188,22 @@ private: AnimatedVectorImageVisual& operator=( const AnimatedVectorImageVisual& visual ) = delete; private: - ImageVisualShaderFactory& mImageVisualShaderFactory; VisualUrl mUrl; + VectorAnimationTaskPtr mVectorAnimationTask; + ImageVisualShaderFactory& mImageVisualShaderFactory; + PropertyNotification mScaleNotification; + PropertyNotification mSizeNotification; Vector2 mVisualSize; - Vector2 mPlayRange; + Vector2 mVisualScale; WeakHandle< Actor > mPlacementActor; - std::unique_ptr< VectorRasterizeThread > mVectorRasterizeThread; - int32_t mLoopCount; + uint32_t mStartFrame; + uint32_t mEndFrame; + uint32_t mResendFlag; DevelAnimatedVectorImageVisual::Action::Type mActionStatus; + DevelImageVisual::StopBehavior::Type mStopBehavior; + DevelImageVisual::LoopingMode::Type mLoopingMode; + bool mRendererAdded; }; } // namespace Internal