#include "async-image-loader-impl.h"
// EXTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/bitmap-loader.h>
#include <dali/integration-api/adaptors/adaptor.h>
namespace Dali
AsyncImageLoader::AsyncImageLoader()
: mLoadedSignal(),
mLoadThread( new EventThreadCallback( MakeCallback( this, &AsyncImageLoader::ProcessLoadedImage ) ) ),
- mLoadTaskId( 0 ),
+ mLoadTaskId( 0u ),
mIsLoadThreadStarted( false )
{
}
}
uint32_t AsyncImageLoader::Load( const std::string& url,
- ImageDimensions size,
+ ImageDimensions dimensions,
FittingMode::Type fittingMode,
SamplingMode::Type samplingMode,
bool orientationCorrection )
mIsLoadThreadStarted = true;
}
- BitmapLoader loader = BitmapLoader::New( url, size, fittingMode, samplingMode, orientationCorrection );
-
- mLoadThread.AddTask( new LoadingTask( ++mLoadTaskId, loader ) );
+ mLoadThread.AddTask( new LoadingTask( ++mLoadTaskId, url, dimensions, fittingMode, samplingMode, orientationCorrection ) );
return mLoadTaskId;
}
{
while( LoadingTask *next = mLoadThread.NextCompletedTask() )
{
- mLoadedSignal.Emit( next->id, next->loader.GetPixelData() );
+ mLoadedSignal.Emit( next->id, next->pixelData );
delete next;
}
}