X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fanimated-image%2Fanimated-image-visual.h;h=0db91546f7d2c1b223d3badf0d23149ba68e7fb4;hp=1e71ba1bdcd01438105d9cd9bb80225915e343ff;hb=4755bc6d25adef606b8f29f1145ffd866a0fbfe9;hpb=d1bfa44065d50bf39a50f8953accb7e565a9c4cc diff --git a/dali-toolkit/internal/visuals/animated-image/animated-image-visual.h b/dali-toolkit/internal/visuals/animated-image/animated-image-visual.h index 1e71ba1..0db9154 100644 --- a/dali-toolkit/internal/visuals/animated-image/animated-image-visual.h +++ b/dali-toolkit/internal/visuals/animated-image/animated-image-visual.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_ANIMATED_IMAGE_VISUAL_H /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,11 +24,13 @@ #include #include #include +#include // INTERNAL INCLUDES #include #include #include +#include namespace Dali { @@ -129,6 +131,11 @@ public: // from Visual */ virtual void DoCreateInstancePropertyMap( Property::Map& map ) const; + /** + * @copydoc Visual::Base::OnDoAction + */ + virtual void OnDoAction( const Dali::Property::Index actionName, const Dali::Property::Value& attributes ) override; + protected: /** @@ -184,6 +191,7 @@ private: /** * Adds the texture set to the renderer, and the renderer to the * placement actor, and starts the frame timer + * @param[in] textureSet The texture set to apply */ void StartFirstFrame( TextureSet& textureSet ); @@ -193,18 +201,14 @@ private: TextureSet PrepareTextureSet(); /** - * Load the gif image and pack the frames into atlas. - * @return The atlas texture. - */ - TextureSet PrepareAnimatedGifImage(); - - /** * Set the image size from the texture set + * @param[in] textureSet The texture set to get the size from */ void SetImageSize( TextureSet& textureSet ); /** * Called when the next frame is ready. + * @param[in] textureSet the texture set to apply */ void FrameReady( TextureSet textureSet ); @@ -214,6 +218,11 @@ private: */ bool DisplayNextFrame(); + /** + * Initialize the gif variables. + * @param[in] imageUrl The url of the animated gif + */ + void InitializeGif( const VisualUrl& imageUrl ); // Undefined AnimatedImageVisual( const AnimatedImageVisual& animatedImageVisual ); @@ -227,10 +236,10 @@ private: WeakHandle mPlacementActor; // Variables for GIF player - Dali::Vector mTextureRectContainer; Dali::Vector mFrameDelayContainer; Vector4 mPixelArea; VisualUrl mImageUrl; + std::unique_ptr mGifLoading; // Only needed for animated gifs uint32_t mCurrentFrameIndex; // Frame index into textureRects // Variables for Multi-Image player @@ -239,13 +248,17 @@ private: uint16_t mCacheSize; uint16_t mBatchSize; uint16_t mFrameDelay; + int16_t mLoopCount; + int16_t mCurrentLoopIndex; uint16_t mUrlIndex; // Shared variables + uint32_t mFrameCount; // Number of frames ImageDimensions mImageSize; Dali::WrapMode::Type mWrapModeU:3; Dali::WrapMode::Type mWrapModeV:3; + DevelAnimatedImageVisual::Action::Type mActionStatus:2; bool mStartFirstFrame:1; };