Revert "[4.0] Add support for Imagevisual to use External Texture as input through...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / texture-manager-impl.h
index 868afdc..117bd1f 100644 (file)
@@ -45,8 +45,6 @@ namespace Toolkit
 
 namespace Internal
 {
-class ImageAtlasManager;
-typedef IntrusivePtr<ImageAtlasManager> ImageAtlasManagerPtr;
 
 /**
  * The TextureManager provides a common Image loading API for Visuals.
@@ -105,17 +103,6 @@ public:
 
 public:
 
-  struct MaskingData
-  {
-    MaskingData();
-    ~MaskingData() = default;
-
-    VisualUrl mAlphaMaskUrl;
-    TextureManager::TextureId mAlphaMaskId;
-    float mContentScaleFactor;
-    bool mCropToMask;
-  };
-
   /**
    * Constructor.
    */
@@ -124,20 +111,11 @@ public:
   /**
    * Destructor.
    */
-  ~TextureManager() = default;
+  ~TextureManager();
 
 
   // TextureManager Main API:
 
-  TextureSet LoadTexture(VisualUrl& url, Dali::ImageDimensions desiredSize,
-                         Dali::FittingMode::Type fittingMode, Dali::SamplingMode::Type samplingMode,
-                         MaskingData* 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.
    *
@@ -367,9 +345,25 @@ 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<AsyncLoadingInfo>  AsyncLoadingInfoContainerType;  ///< The container type used to manage Asynchronous loads in progress
+  typedef std::vector<AtlasInfo>        AtlasInfoContainerType;         ///< The container type used to manage Atlas creation and destruction
   typedef std::vector<TextureInfo>      TextureInfoContainerType;       ///< The container type used to manage the life-cycle and caching of Textures
 
   /**
@@ -592,6 +586,7 @@ 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