[Tizen]Save textureId directly at RequsetLoad()
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / texture-manager-impl.h
index 2ef7801..5e46a02 100644 (file)
@@ -303,9 +303,9 @@ public:
    * @param[in] orientationCorrection Whether to rotate image to match embedded orientation data
    * @param[in] reloadPolicy          Forces a reload of the texture even if already cached
    * @param[in,out] preMultiplyOnLoad     True if the image color should be multiplied by it's alpha. Set to false if the image has no alpha channel
-   * @return                          A TextureId to use as a handle to reference this Texture
+   * @param[out] textureId            The TextureId to use as a handle to reference this Texture
    */
-  TextureId RequestLoad(const VisualUrl&             url,
+  void      RequestLoad(const VisualUrl&             url,
                         const ImageDimensions        desiredSize,
                         FittingMode::Type            fittingMode,
                         Dali::SamplingMode::Type     samplingMode,
@@ -313,7 +313,8 @@ public:
                         TextureUploadObserver*       observer,
                         bool                         orientationCorrection,
                         TextureManager::ReloadPolicy reloadPolicy,
-                        MultiplyOnLoad&              preMultiplyOnLoad);
+                        MultiplyOnLoad&              preMultiplyOnLoad,
+                        TextureId&                   textureId);
 
   /**
    * @brief Requests an image load of the given URL, when the texture has
@@ -345,9 +346,9 @@ public:
    * @param[in] reloadPolicy          Forces a reload of the texture even if already cached
    * @param[in] preMultiplyOnLoad     True if the image color should be multiplied by it's alpha. Set to false if the
    *                                  image has no alpha channel
-   * @return                          A TextureId to use as a handle to reference this Texture
+   * @param[out] textureId            The TextureId to use as a handle to reference this Texture
    */
-  TextureId RequestLoad(const VisualUrl&             url,
+  void      RequestLoad(const VisualUrl&             url,
                         TextureId                    maskTextureId,
                         float                        contentScale,
                         const ImageDimensions        desiredSize,
@@ -358,13 +359,14 @@ public:
                         TextureUploadObserver*       observer,
                         bool                         orientationCorrection,
                         TextureManager::ReloadPolicy reloadPolicy,
-                        MultiplyOnLoad&              preMultiplyOnLoad);
+                        MultiplyOnLoad&              preMultiplyOnLoad,
+                        TextureId&                   textureId);
 
   /**
    * Requests a masking image to be loaded. This mask is not uploaded to GL,
    * instead, it is stored in CPU memory, and can be used for CPU blending.
    */
-  TextureId RequestMaskLoad(const VisualUrl& maskUrl, StorageType storageType);
+  void RequestMaskLoad(const VisualUrl& maskUrl, StorageType storageType, TextureId& textureId);
 
   /**
    * @brief Remove a Texture from the TextureManager.
@@ -502,9 +504,11 @@ private:
    *                                  there is no alpha
    * @param[in] animatedImageLoading  The AnimatedImageLoading to load animated image
    * @param[in] frameIndex            The frame index of a frame to be loaded frame
-   * @return                          A TextureId to use as a handle to reference this Texture
+   * @param[in] useCache              True if use cached
+   * @param[in] loadYuvPlanes         The YUV Planes
+   * @param[out] textureId            The TextureId to use as a handle to reference this Texture
    */
-  TextureId RequestLoadInternal(
+  void RequestLoadInternal(
     const VisualUrl&             url,
     TextureId                    maskTextureId,
     float                        contentScale,
@@ -521,7 +525,8 @@ private:
     Dali::AnimatedImageLoading   animatedImageLoading,
     uint32_t                     frameIndex,
     bool                         useCache,
-    bool                         loadYuvPlanes);
+    bool                         loadYuvPlanes,
+    TextureId&                   textureId);
 
   /**
    * @brief Get the current state of a texture