X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fanimated-vector-image%2Fvector-rasterize-thread.h;h=c40e6e96fda8eb4402dd04b67f55aedc4bd83bf9;hb=9261436cbbc4ab26fd226b8ddf2dceb77468e0a1;hp=f8d409bd31ea434556646dd8d35aa22e144485ae;hpb=cb624d6e60bfb8032e81f8adc71e14ebedc7e260;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/animated-vector-image/vector-rasterize-thread.h b/dali-toolkit/internal/visuals/animated-vector-image/vector-rasterize-thread.h index f8d409b..c40e6e9 100644 --- a/dali-toolkit/internal/visuals/animated-vector-image/vector-rasterize-thread.h +++ b/dali-toolkit/internal/visuals/animated-vector-image/vector-rasterize-thread.h @@ -142,6 +142,24 @@ public: */ bool IsResourceReady() const; + /** + * @brief Sets the progress of the animation. + * @param[in] progress The new progress as a normalized value between [0,1] or between the play range if specified. + */ + void SetCurrentProgress( float progress ); + + /** + * @brief Retrieves the current progress of the animation. + * @return The current progress as a normalized value between [0,1] + */ + float GetCurrentProgress() const; + + /** + * @brief Gets the default size of the file,. + * @return The default size of the file + */ + void GetDefaultSize( uint32_t& width, uint32_t& height ) const; + protected: /** @@ -153,15 +171,9 @@ protected: private: /** - * @brief Called by the rasterize thread which ensures a wait if required. - * @return false if the thread should stop. - */ - bool IsThreadReady(); - - /** - * @brief Start rendering + * @brief Initialize the vector renderer. */ - bool StartRender(); + void Initialize(); /** * @brief Rasterize the current frame. @@ -179,12 +191,13 @@ private: std::string mUrl; VectorAnimationRenderer mVectorRenderer; ConditionalWait mConditionalWait; - Dali::Mutex mMutex; std::unique_ptr< EventThreadCallback > mResourceReadyTrigger; std::unique_ptr< EventThreadCallback > mAnimationFinishedTrigger; Vector2 mPlayRange; DevelImageVisual::PlayState mPlayState; + int64_t mFrameDurationNanoSeconds; float mProgress; + float mFrameRate; uint32_t mCurrentFrame; uint32_t mTotalFrame; uint32_t mStartFrame; @@ -196,6 +209,7 @@ private: bool mNeedRender; bool mDestroyThread; ///< Whether the thread be destroyed bool mResourceReady; + bool mCurrentFrameUpdated; const Dali::LogFactoryInterface& mLogFactory; ///< The log factory };