-#ifndef DALI_TOOLKIT_TEXTURE_MANAGER_H
-#define DALI_TOOLKIT_TEXTURE_MANAGER_H
+#ifndef DALI_TOOLKIT_TEXTURE_MANAGER_IMPL_H
+#define DALI_TOOLKIT_TEXTURE_MANAGER_IMPL_H
/*
* Copyright (c) 2017 Samsung Electronics Co., Ltd.
*/
TextureSet GetTextureSet( TextureId textureId );
+ /**
+ * Adds an external texture to the texture manager
+ * @param[in] texture The texture to add
+ * @return string containing the URL for the texture
+ */
+ std::string AddExternalTexture( TextureSet& texture );
+
+ /**
+ * Removes an external texture from texture manager
+ * @param[in] url The string containing the texture to remove
+ * @return handle to the texture
+ */
+ TextureSet RemoveExternalTexture( const std::string& url );
+
private:
/**
AsyncLoadingInfoContainerType mLoadingInfoContainer;
};
+ struct ExternalTextureInfo
+ {
+ TextureId textureId;
+ TextureSet textureSet;
+ };
+
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
- TextureId mCurrentTextureId; ///< The current value used for the unique Texture Id generation
+ 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
+ std::vector< ExternalTextureInfo > mExternalTextures; ///< Externally provided textures
+ TextureId mCurrentTextureId; ///< The current value used for the unique Texture Id generation
- 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
};
} // namespace Dali
-#endif // DALI_TOOLKIT_TEXTURE_MANAGER_H
+#endif // DALI_TOOLKIT_TEXTURE_MANAGER_IMPL_H