- Delete isMaskTask
- Add new information property to check whether the mask is applied or not.
Change-Id: I5496f78f6df385d37b3282a8fcef2c807389622b
Signed-off-by: Seungho, Baek <sbsh.baek@samsung.com>
namespace DevelAsyncImageLoader
{
namespace DevelAsyncImageLoader
{
-typedef Signal< void ( uint32_t, Devel::PixelBuffer, bool ) > PixelBufferLoadedSignalType;
+typedef Signal< void ( uint32_t, Devel::PixelBuffer ) > PixelBufferLoadedSignalType;
/**
* @brief Whether to multiply alpha into color channels on load
/**
* @brief Whether to multiply alpha into color channels on load
{
if( mPixelBufferLoadedSignal.GetConnectionCount() > 0 )
{
{
if( mPixelBufferLoadedSignal.GetConnectionCount() > 0 )
{
- mPixelBufferLoadedSignal.Emit( next->id, next->pixelBuffer, next->isMaskTask );
+ mPixelBufferLoadedSignal.Emit( next->id, next->pixelBuffer );
}
else if( mLoadedSignal.GetConnectionCount() > 0 )
{
}
else if( mLoadedSignal.GetConnectionCount() > 0 )
{
}
void TextureManager::AsyncLoadComplete( AsyncLoadingInfoContainerType& loadingContainer, uint32_t id,
}
void TextureManager::AsyncLoadComplete( AsyncLoadingInfoContainerType& loadingContainer, uint32_t id,
- Devel::PixelBuffer pixelBuffer, bool isMaskTask )
+ Devel::PixelBuffer pixelBuffer )
{
DALI_LOG_INFO( gTextureManagerLogFilter, Debug::Concise, "TextureManager::AsyncLoadComplete( id:%d )\n", id );
{
DALI_LOG_INFO( gTextureManagerLogFilter, Debug::Concise, "TextureManager::AsyncLoadComplete( id:%d )\n", id );
if( textureInfo.loadState != CANCELLED )
{
if( textureInfo.loadState != CANCELLED )
{
+ if( textureInfo.maskApplied )
{
textureInfo.loadState = MASK_APPLIED;
}
{
textureInfo.loadState = MASK_APPLIED;
}
textureInfo.url.GetUrl().c_str(), textureInfo.loadSynchronously?"T":"F" );
textureInfo.loadState = MASK_APPLYING;
textureInfo.url.GetUrl().c_str(), textureInfo.loadSynchronously?"T":"F" );
textureInfo.loadState = MASK_APPLYING;
+ textureInfo.maskApplied = true;
auto& loadersContainer = textureInfo.url.IsLocalResource() ? mAsyncLocalLoaders : mAsyncRemoteLoaders;
auto loadingHelperIt = loadersContainer.GetNext();
DALI_ASSERT_ALWAYS(loadingHelperIt != loadersContainer.End());
auto& loadersContainer = textureInfo.url.IsLocalResource() ? mAsyncLocalLoaders : mAsyncRemoteLoaders;
auto loadingHelperIt = loadersContainer.GetNext();
DALI_ASSERT_ALWAYS(loadingHelperIt != loadersContainer.End());
}
void TextureManager::AsyncLoadingHelper::AsyncLoadComplete(uint32_t id,
}
void TextureManager::AsyncLoadingHelper::AsyncLoadComplete(uint32_t id,
- Devel::PixelBuffer pixelBuffer,
- bool isMaskTask)
+ Devel::PixelBuffer pixelBuffer )
- mTextureManager.AsyncLoadComplete(mLoadingInfoContainer, id, pixelBuffer, isMaskTask);
+ mTextureManager.AsyncLoadComplete( mLoadingInfoContainer, id, pixelBuffer );
}
void TextureManager::SetBrokenImageUrl(const std::string& brokenImageUrl)
}
void TextureManager::SetBrokenImageUrl(const std::string& brokenImageUrl)
cropToMask( cropToMask ),
orientationCorrection( true ),
preMultiplyOnLoad( preMultiplyOnLoad ),
cropToMask( cropToMask ),
orientationCorrection( true ),
preMultiplyOnLoad( preMultiplyOnLoad ),
+ preMultiplied( false ),
+ maskApplied( false )
bool orientationCorrection:1; ///< true if the image should be rotated to match exif orientation data
bool preMultiplyOnLoad:1; ///< true if the image's color should be multiplied by it's alpha
bool preMultiplied:1; ///< true if the image's color was multiplied by it's alpha
bool orientationCorrection:1; ///< true if the image should be rotated to match exif orientation data
bool preMultiplyOnLoad:1; ///< true if the image's color should be multiplied by it's alpha
bool preMultiplied:1; ///< true if the image's color was multiplied by it's alpha
+ bool maskApplied:1; ///< true if the image's mask is applied
* @param[in] container The Async loading container
* @param[in] id This is the async image loaders Id
* @param[in] pixelBuffer The loaded image data
* @param[in] container The Async loading container
* @param[in] id This is the async image loaders Id
* @param[in] pixelBuffer The loaded image data
- * @param[in] isMaskTask whether this task is for mask or not
- void AsyncLoadComplete( AsyncLoadingInfoContainerType& container, uint32_t id, Devel::PixelBuffer pixelBuffer, bool isMaskTask );
+ void AsyncLoadComplete( AsyncLoadingInfoContainerType& container, uint32_t id, Devel::PixelBuffer pixelBuffer );
/**
* @brief Performs Post-Load steps including atlasing.
/**
* @brief Performs Post-Load steps including atlasing.
/**
* @brief Main constructor that used by all other constructors
*/
/**
* @brief Main constructor that used by all other constructors
*/
- AsyncLoadingHelper(Toolkit::AsyncImageLoader loader,
- TextureManager& textureManager,
- AsyncLoadingInfoContainerType&& loadingInfoContainer);
+ AsyncLoadingHelper( Toolkit::AsyncImageLoader loader,
+ TextureManager& textureManager,
+ AsyncLoadingInfoContainerType&& loadingInfoContainer );
/**
* @brief Callback to be called when texture loading is complete, it passes the pixel buffer on to texture manager.
* @param[in] id Loader id
* @param[in] pixelBuffer Image data
/**
* @brief Callback to be called when texture loading is complete, it passes the pixel buffer on to texture manager.
* @param[in] id Loader id
* @param[in] pixelBuffer Image data
- * @param[in] isMaskTask whether this task is for mask or not
- void AsyncLoadComplete(uint32_t id, Devel::PixelBuffer pixelBuffer, bool isMaskTask);
+ void AsyncLoadComplete( uint32_t id, Devel::PixelBuffer pixelBuffer );
private:
Toolkit::AsyncImageLoader mLoader;
private:
Toolkit::AsyncImageLoader mLoader;