X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fimage-loader%2Fasync-image-loader-impl.h;h=4ffda6c99d54746b13efa54dfef06f6b4261a350;hp=92a16522d6e41232dddcac94840bc1c35909d1fa;hb=666b4b2f13d2f417557180a8440c6686c5dbfe83;hpb=fc829906bc88730e08c8d483a351bd1a1ffc563f diff --git a/dali-toolkit/internal/image-loader/async-image-loader-impl.h b/dali-toolkit/internal/image-loader/async-image-loader-impl.h index 92a1652..4ffda6c 100644 --- a/dali-toolkit/internal/image-loader/async-image-loader-impl.h +++ b/dali-toolkit/internal/image-loader/async-image-loader-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_ASYNC_IMAGE_LOADER_IMPL_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -23,6 +23,7 @@ // INTERNAL INCLUDES #include +#include #include namespace Dali @@ -49,13 +50,35 @@ public: static IntrusivePtr New(); /** - * @copydoc Toolkit::AsyncImageLoader::Load( const std::string&, ImageDimensions, FittingMode::Type, SamplingMode::Type, bool ) + * @copydoc Toolkit::AsyncImageLoader::LoadAnimatedImage( Dali::AnimatedImageLoading animatedImageLoading, uint32_t frameIndex ) */ - uint32_t Load( const std::string& url, + uint32_t LoadAnimatedImage( Dali::AnimatedImageLoading animatedImageLoading, + uint32_t frameIndex ); + + /** + * @copydoc Toolkit::AsyncImageLoader::Load( const std::string&, ImageDimensions, FittingMode::Type, SamplingMode::Type, bool , DevelAsyncImageLoader::PreMultiplyOnLoad ) + */ + uint32_t Load( const VisualUrl& url, ImageDimensions dimensions, FittingMode::Type fittingMode, SamplingMode::Type samplingMode, - bool orientationCorrection ); + bool orientationCorrection, + DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad ); + + /** + * @brief Starts an mask applying task. + * @param[in] pixelBuffer of the to be masked image + * @param[in] maskPixelBuffer of the mask image + * @param[in] contentScale The factor to scale the content + * @param[in] cropToMask Whether to crop the content to the mask size + * @param[in] preMultiplyOnLoad ON if the image color should be multiplied by it's alpha. Set to OFF if there is no alpha. + * @return The loading task id + */ + uint32_t ApplyMask( Devel::PixelBuffer pixelBuffer, + Devel::PixelBuffer maskPixelBuffer, + float contentScale, + bool cropToMask, + DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad ); /** * @copydoc Toolkit::AsyncImageLoader::ImageLoadedSignal @@ -63,6 +86,11 @@ public: Toolkit::AsyncImageLoader::ImageLoadedSignalType& ImageLoadedSignal(); /** + * @copydoc Toolkit::AsyncImageLoader::PixelBufferLoadedSignal + */ + Toolkit::DevelAsyncImageLoader::PixelBufferLoadedSignalType& PixelBufferLoadedSignal(); + + /** * @copydoc Toolkit::AsyncImageLoader::Cancel */ bool Cancel( uint32_t loadingTaskId ); @@ -82,17 +110,15 @@ protected: /** * Destructor */ - ~AsyncImageLoader(); + ~AsyncImageLoader() override; private: - Toolkit::AsyncImageLoader::ImageLoadedSignalType mLoadedSignal; + Toolkit::DevelAsyncImageLoader::PixelBufferLoadedSignalType mPixelBufferLoadedSignal; ImageLoadThread mLoadThread; uint32_t mLoadTaskId; bool mIsLoadThreadStarted; - - }; } // namespace Internal