Merge "Update README for dali-swig" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / image-loader / async-image-loader-impl.cpp
index d25ea5c..1fbef38 100644 (file)
@@ -19,7 +19,6 @@
 #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
@@ -34,7 +33,7 @@ namespace Internal
 AsyncImageLoader::AsyncImageLoader()
 : mLoadedSignal(),
   mLoadThread( new EventThreadCallback( MakeCallback( this, &AsyncImageLoader::ProcessLoadedImage ) ) ),
-  mLoadTaskId( 0 ),
+  mLoadTaskId( 0u ),
   mIsLoadThreadStarted( false )
 {
 }
@@ -51,7 +50,7 @@ IntrusivePtr<AsyncImageLoader> AsyncImageLoader::New()
 }
 
 uint32_t AsyncImageLoader::Load( const std::string& url,
-                                 ImageDimensions size,
+                                 ImageDimensions dimensions,
                                  FittingMode::Type fittingMode,
                                  SamplingMode::Type samplingMode,
                                  bool orientationCorrection )
@@ -62,9 +61,7 @@ uint32_t AsyncImageLoader::Load( const std::string& url,
     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;
 }
@@ -88,7 +85,7 @@ void AsyncImageLoader::ProcessLoadedImage()
 {
   while( LoadingTask *next =  mLoadThread.NextCompletedTask() )
   {
-    mLoadedSignal.Emit( next->id, next->loader.GetPixelData() );
+    mLoadedSignal.Emit( next->id, next->pixelData );
     delete next;
   }
 }