-uint32_t AsyncImageLoader::Load( const VisualUrl& url,
- ImageDimensions dimensions,
- FittingMode::Type fittingMode,
- SamplingMode::Type samplingMode,
- bool orientationCorrection,
- DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad)
+uint32_t AsyncImageLoader::LoadAnimatedImage(Dali::AnimatedImageLoading animatedImageLoading,
+ uint32_t frameIndex)
+{
+ if(!mIsLoadThreadStarted)
+ {
+ mLoadThread.Start();
+ mIsLoadThreadStarted = true;
+ }
+ mLoadThread.AddTask(new LoadingTask(++mLoadTaskId, animatedImageLoading, frameIndex));
+
+ return mLoadTaskId;
+}
+
+uint32_t AsyncImageLoader::Load(const VisualUrl& url,
+ ImageDimensions dimensions,
+ FittingMode::Type fittingMode,
+ SamplingMode::Type samplingMode,
+ bool orientationCorrection,
+ DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad)
+{
+ if(!mIsLoadThreadStarted)
+ {
+ mLoadThread.Start();
+ mIsLoadThreadStarted = true;
+ }
+ if(url.IsBufferResource())
+ {
+ auto visualFactory = Toolkit::VisualFactory::Get();
+ if(visualFactory)
+ {
+ // Get EncodedImageBuffer from texturemanager
+ // and make new LoadingTask with buffer
+ auto& textureManager = GetImplementation(visualFactory).GetTextureManager();
+
+ const EncodedImageBuffer& encodedBuffer = textureManager.GetEncodedImageBuffer(url.GetUrl());
+
+ mLoadThread.AddTask(new LoadingTask(++mLoadTaskId, encodedBuffer, dimensions, fittingMode, samplingMode, orientationCorrection, preMultiplyOnLoad));
+ }
+ }
+ else
+ {
+ mLoadThread.AddTask(new LoadingTask(++mLoadTaskId, url, dimensions, fittingMode, samplingMode, orientationCorrection, preMultiplyOnLoad));
+ }
+
+ return mLoadTaskId;
+}
+
+uint32_t AsyncImageLoader::ApplyMask(Devel::PixelBuffer pixelBuffer,
+ Devel::PixelBuffer maskPixelBuffer,
+ float contentScale,
+ bool cropToMask,
+ DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad)