X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fanimated-vector-image%2Fanimated-vector-image-visual.h;h=01528698c73aa3f2e395be840f6bc2e91b54f65a;hb=175d74ab98dd2f89726ce6594a08d65e0d01056f;hp=23705d8c6c382c26f9cffb1beb223e990965600a;hpb=266f7c9dab54e8edfee2f20b56bc70229511b7f8;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git 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 23705d8..0152869 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,13 +21,16 @@ // EXTERNAL INCLUDES #include #include -#include +#include +#include +#include +#include // INTERNAL INCLUDES #include #include #include -#include +#include namespace Dali { @@ -39,7 +42,6 @@ namespace Internal { class ImageVisualShaderFactory; -class VectorRasterizeThread; class AnimatedVectorImageVisual; using AnimatedVectorImageVisualPtr = IntrusivePtr< AnimatedVectorImageVisual >; @@ -54,7 +56,7 @@ using AnimatedVectorImageVisualPtr = IntrusivePtr< AnimatedVectorImageVisual >; * | url | STRING | * */ -class AnimatedVectorImageVisual: public Visual::Base +class AnimatedVectorImageVisual: public Visual::Base, public ConnectionTracker, public Integration::Processor { public: @@ -137,6 +139,13 @@ protected: */ void OnDoAction( const Property::Index actionId, const Property::Value& attributes ) override; +protected: // Implementation of Processor + + /** + * @copydoc Dali::Integration::Processor::Process() + */ + void Process() override; + private: /** @@ -147,9 +156,9 @@ 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. @@ -161,6 +170,41 @@ private: */ void SendAnimationData(); + /** + * @brief Set the vector image size. + */ + void SetVectorImageSize(); + + /** + * @brief Stop the animation. + */ + void StopAnimation(); + + /** + * @brief Trigger rasterization of the vector content. + */ + void TriggerVectorRasterization(); + + /** + * @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 OnControlVisibilityChanged( Actor actor, bool visible, DevelActor::VisibilityChange::Type type ); + + /** + * @brief Callback when the visibility of the window is changed. + */ + void OnWindowVisibilityChanged( Window window, bool visible ); + // Undefined AnimatedVectorImageVisual( const AnimatedVectorImageVisual& visual ) = delete; @@ -168,18 +212,18 @@ private: AnimatedVectorImageVisual& operator=( const AnimatedVectorImageVisual& visual ) = delete; private: - ImageVisualShaderFactory& mImageVisualShaderFactory; VisualUrl mUrl; - VectorRasterizeThread mVectorRasterizeThread; + VectorAnimationTask::AnimationData mAnimationData; + VectorAnimationTaskPtr mVectorAnimationTask; + ImageVisualShaderFactory& mImageVisualShaderFactory; + PropertyNotification mScaleNotification; + PropertyNotification mSizeNotification; Vector2 mVisualSize; + Vector2 mVisualScale; WeakHandle< Actor > mPlacementActor; - int32_t mLoopCount; - int32_t mStartFrame; - int32_t mEndFrame; - uint32_t mResendFlag; DevelAnimatedVectorImageVisual::Action::Type mActionStatus; - DevelImageVisual::StopBehavior::Type mStopBehavior; - DevelImageVisual::LoopingMode::Type mLoopingMode; + bool mRendererAdded; + bool mRasterizationTriggered; }; } // namespace Internal