Support YUV decoding for JPEG
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / texture-manager / texture-async-loading-helper.h
index 4bfc961..d8830f7 100644 (file)
@@ -64,10 +64,12 @@ public:
    * @param[in] textureId             TextureId to reference the texture that will be loaded
    * @param[in] animatedImageLoading  The AnimatedImageLoading to load animated image
    * @param[in] frameIndex            The frame index of a frame to be loaded frame
+   * @param[in] preMultiplyOnLoad     if the image's color should be multiplied by it's alpha. Set to OFF if there is no alpha or if the image need to be applied alpha mask.
    */
-  void LoadAnimatedImage(const TextureManager::TextureId& textureId,
-                         Dali::AnimatedImageLoading       animatedImageLoading,
-                         const std::uint32_t&             frameIndex);
+  void LoadAnimatedImage(const TextureManager::TextureId&                textureId,
+                         Dali::AnimatedImageLoading                      animatedImageLoading,
+                         const std::uint32_t&                            frameIndex,
+                         const DevelAsyncImageLoader::PreMultiplyOnLoad& preMultiplyOnLoad);
 
   /**
    * @brief Load a new texture.
@@ -80,6 +82,7 @@ public:
    * @param[in] orientationCorrection Whether to use image metadata to rotate or flip the image,
    *                                  e.g., from portrait to landscape
    * @param[in] preMultiplyOnLoad     if the image's color should be multiplied by it's alpha. Set to OFF if there is no alpha or if the image need to be applied alpha mask.
+   * @param[in] loadYuvPlanes         True if the image should be loaded as yuv planes
    */
   void Load(const TextureManager::TextureId&                textureId,
             const VisualUrl&                                url,
@@ -87,7 +90,8 @@ public:
             const Dali::FittingMode::Type&                  fittingMode,
             const Dali::SamplingMode::Type&                 samplingMode,
             const bool&                                     orientationCorrection,
-            const DevelAsyncImageLoader::PreMultiplyOnLoad& preMultiplyOnLoad);
+            const DevelAsyncImageLoader::PreMultiplyOnLoad& preMultiplyOnLoad,
+            const bool&                                     loadYuvPlanes);
 
   /**
    * @brief Apply mask
@@ -124,11 +128,11 @@ private:
                             AsyncLoadingInfoContainerType&& loadingInfoContainer);
 
   /**
-   * @brief Callback to be called when texture loading is complete, it passes the pixel buffer on to texture manager.
-   * @param[in] id          Loader id
-   * @param[in] pixelBuffer Image data
+   * @brief Callback to be called when texture loading is complete, it passes the pixel buffer list on to texture manager.
+   * @param[in] id           Loader id
+   * @param[in] pixelBuffers Image data
    */
-  void AsyncLoadComplete(std::uint32_t id, Devel::PixelBuffer pixelBuffer);
+  void AsyncLoadComplete(std::uint32_t id, std::vector<Devel::PixelBuffer>& pixelBuffers);
 
 private: // Member Variables:
   Toolkit::AsyncImageLoader     mLoader;