/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
return internal;
}
-uint32_t AsyncImageLoader::LoadAnimatedImage(Dali::AnimatedImageLoading animatedImageLoading,
- uint32_t frameIndex)
+uint32_t AsyncImageLoader::LoadAnimatedImage(Dali::AnimatedImageLoading animatedImageLoading,
+ uint32_t frameIndex,
+ DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad)
{
if(!mIsLoadThreadStarted)
{
mLoadThread.Start();
mIsLoadThreadStarted = true;
}
- mLoadThread.AddTask(new LoadingTask(++mLoadTaskId, animatedImageLoading, frameIndex));
+ mLoadThread.AddTask(new LoadingTask(++mLoadTaskId, animatedImageLoading, frameIndex, preMultiplyOnLoad));
return mLoadTaskId;
}
FittingMode::Type fittingMode,
SamplingMode::Type samplingMode,
bool orientationCorrection,
- DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad)
+ DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad,
+ bool loadPlanes)
{
if(!mIsLoadThreadStarted)
{
mLoadThread.Start();
mIsLoadThreadStarted = true;
}
- mLoadThread.AddTask(new LoadingTask(++mLoadTaskId, url, dimensions, fittingMode, samplingMode, orientationCorrection, preMultiplyOnLoad));
+ mLoadThread.AddTask(new LoadingTask(++mLoadTaskId, url, dimensions, fittingMode, samplingMode, orientationCorrection, preMultiplyOnLoad, loadPlanes));
+
+ return mLoadTaskId;
+}
+
+uint32_t AsyncImageLoader::LoadEncodedImageBuffer(const EncodedImageBuffer& encodedImageBuffer,
+ ImageDimensions dimensions,
+ FittingMode::Type fittingMode,
+ SamplingMode::Type samplingMode,
+ bool orientationCorrection,
+ DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad)
+{
+ if(!mIsLoadThreadStarted)
+ {
+ mLoadThread.Start();
+ mIsLoadThreadStarted = true;
+ }
+ mLoadThread.AddTask(new LoadingTask(++mLoadTaskId, encodedImageBuffer, dimensions, fittingMode, samplingMode, orientationCorrection, preMultiplyOnLoad));
return mLoadTaskId;
}
{
if(mPixelBufferLoadedSignal.GetConnectionCount() > 0)
{
- mPixelBufferLoadedSignal.Emit(next->id, next->pixelBuffer);
+ mPixelBufferLoadedSignal.Emit(next->id, next->pixelBuffers);
}
else if(mLoadedSignal.GetConnectionCount() > 0)
{
PixelData pixelData;
- if(next->pixelBuffer)
+ if(!next->pixelBuffers.empty())
{
- pixelData = Devel::PixelBuffer::Convert(next->pixelBuffer);
+ pixelData = Devel::PixelBuffer::Convert(next->pixelBuffers[0]);
}
mLoadedSignal.Emit(next->id, pixelData);
}