Merge "Support Asynchronous Loading of Animated Image" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / image-loader / async-image-loader-devel.cpp
index 451ace3..e9b7744 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,6 +24,13 @@ namespace Toolkit
 namespace DevelAsyncImageLoader
 {
 
+uint32_t LoadAnimatedImage( AsyncImageLoader asyncImageLoader,
+                            Dali::AnimatedImageLoading animatedImageLoading,
+                            uint32_t frameIndex )
+{
+  return GetImplementation( asyncImageLoader ).LoadAnimatedImage( animatedImageLoading, frameIndex );
+}
+
 uint32_t Load( AsyncImageLoader asyncImageLoader,
                const std::string& url,
                ImageDimensions dimensions,
@@ -35,6 +42,16 @@ uint32_t Load( AsyncImageLoader asyncImageLoader,
   return GetImplementation( asyncImageLoader ).Load( Toolkit::Internal::VisualUrl(url), dimensions, fittingMode, samplingMode, orientationCorrection, preMultiplyOnLoad);
 }
 
+uint32_t ApplyMask( AsyncImageLoader asyncImageLoader,
+                    Devel::PixelBuffer pixelBuffer,
+                    Devel::PixelBuffer maskPixelBuffer,
+                    float contentScale,
+                    bool cropToMask,
+                    DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad )
+{
+  return GetImplementation( asyncImageLoader ).ApplyMask( pixelBuffer, maskPixelBuffer, contentScale, cropToMask, preMultiplyOnLoad );
+}
+
 PixelBufferLoadedSignalType& PixelBufferLoadedSignal( AsyncImageLoader asyncImageLoader )
 {
   return GetImplementation( asyncImageLoader ).PixelBufferLoadedSignal();