X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fimage-loader%2Fasync-image-loader-impl.cpp;h=62a3fdd7e51f9b23a0273880b0051562e4196a64;hb=81529cb3b54f998306def4db0ba3f5f5a65c0c30;hp=966da79bcae345ba8bca1015b72d04371bf998a8;hpb=f85eb5da84c2c74ec934e3bc65a76b4fa84323f8;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/image-loader/async-image-loader-impl.cpp b/dali-toolkit/internal/image-loader/async-image-loader-impl.cpp index 966da79..62a3fdd 100644 --- a/dali-toolkit/internal/image-loader/async-image-loader-impl.cpp +++ b/dali-toolkit/internal/image-loader/async-image-loader-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -19,7 +19,7 @@ #include "async-image-loader-impl.h" // EXTERNAL INCLUDES -#include +#include namespace Dali { @@ -53,15 +53,30 @@ uint32_t AsyncImageLoader::Load( const VisualUrl& url, ImageDimensions dimensions, FittingMode::Type fittingMode, SamplingMode::Type samplingMode, - bool orientationCorrection ) + bool orientationCorrection, + DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad) { 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 ) ); + return mLoadTaskId; +} + +uint32_t AsyncImageLoader::ApplyMask( Devel::PixelBuffer pixelBuffer, + Devel::PixelBuffer maskPixelBuffer, + float contentScale, + bool cropToMask ) +{ + if( !mIsLoadThreadStarted ) + { + mLoadThread.Start(); + mIsLoadThreadStarted = true; + } + mLoadThread.AddTask( new LoadingTask( ++mLoadTaskId, pixelBuffer, maskPixelBuffer, contentScale, cropToMask ) ); return mLoadTaskId; }