X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Ftexture-manager-impl.h;h=7a243fd528e27caad1b6931a4458f4b4d93e48b0;hp=117bd1f2c98d2343b731fcd7940a9d6d0293d245;hb=18b2fbead069731d9deb5a634cf98c433d172bbe;hpb=58ae307297125b55c93c38a631a8745c6a7c51f1 diff --git a/dali-toolkit/internal/visuals/texture-manager-impl.h b/dali-toolkit/internal/visuals/texture-manager-impl.h index 117bd1f..7a243fd 100644 --- a/dali-toolkit/internal/visuals/texture-manager-impl.h +++ b/dali-toolkit/internal/visuals/texture-manager-impl.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -45,6 +46,8 @@ namespace Toolkit namespace Internal { +class ImageAtlasManager; +typedef IntrusivePtr ImageAtlasManagerPtr; /** * The TextureManager provides a common Image loading API for Visuals. @@ -103,6 +106,18 @@ public: public: + struct MaskingData + { + MaskingData(); + ~MaskingData() = default; + + VisualUrl mAlphaMaskUrl; + TextureManager::TextureId mAlphaMaskId; + float mContentScaleFactor; + bool mCropToMask; + }; + using MaskingDataPointer = std::unique_ptr; + /** * Constructor. */ @@ -111,11 +126,20 @@ public: /** * Destructor. */ - ~TextureManager(); + ~TextureManager() = default; // TextureManager Main API: + TextureSet LoadTexture(VisualUrl& url, Dali::ImageDimensions desiredSize, + Dali::FittingMode::Type fittingMode, Dali::SamplingMode::Type samplingMode, + const MaskingDataPointer& maskInfo, bool synchronousLoading, + TextureManager::TextureId& textureId, Vector4& textureRect, + bool& atlasingStatus, bool& loadingStatus, Dali::WrapMode::Type wrapModeU, + Dali::WrapMode::Type wrapModeV, TextureUploadObserver* textureObserver, + AtlasUploadObserver* atlasObserver, + ImageAtlasManagerPtr imageAtlasManager); + /** * @brief Requests an image load of the given URL. * @@ -345,25 +369,9 @@ private: unsigned short loadId; ///< The load Id used by the async loader to reference this load }; - /** - * @brief This struct is used within a container to manage atlas creation and destruction. - */ - struct AtlasInfo - { - AtlasInfo( Toolkit::ImageAtlas atlas, TextureSet textureSet ) - : atlas( atlas ), - textureSet( textureSet ) - { - } - - Toolkit::ImageAtlas atlas; ///< The ImageAtlas object - TextureSet textureSet; ///< The TextureSet is kept in the struct to allow fast lookup of TextureSet to Atlas - }; - // Private typedefs: typedef std::deque AsyncLoadingInfoContainerType; ///< The container type used to manage Asynchronous loads in progress - typedef std::vector AtlasInfoContainerType; ///< The container type used to manage Atlas creation and destruction typedef std::vector TextureInfoContainerType; ///< The container type used to manage the life-cycle and caching of Textures /** @@ -586,7 +594,6 @@ private: private: // Member Variables: - AtlasInfoContainerType mAtlasContainer; ///< Used to manage Atlas creation and destruction TextureInfoContainerType mTextureInfoContainer; ///< Used to manage the life-cycle and caching of Textures RoundRobinContainerView< AsyncLoadingHelper > mAsyncLocalLoaders; ///< The Asynchronous image loaders used to provide all local async loads RoundRobinContainerView< AsyncLoadingHelper > mAsyncRemoteLoaders; ///< The Asynchronous image loaders used to provide all remote async loads