AllocateMaskData();
// Immediately trigger the alpha mask loading (it may just get a cached value)
mMaskingData->mAlphaMaskUrl = alphaUrl;
+ TextureManager& textureManager = mFactoryCache.GetTextureManager();
+ mMaskingData->mAlphaMaskId = textureManager.RequestMaskLoad( alphaUrl );
}
break;
}
{
Devel::PixelBuffer pixelBuffer = LoadImageFromFile( url.GetUrl(), desiredSize, fittingMode, samplingMode,
orientationCorrection );
- if( maskInfo )
- {
- Devel::PixelBuffer maskPixelBuffer = LoadImageFromFile( maskInfo->mAlphaMaskUrl.GetUrl(), ImageDimensions(),
- FittingMode::SCALE_TO_FILL, SamplingMode::NO_FILTER, true );
- if( maskPixelBuffer )
- {
- pixelBuffer.ApplyMask( maskPixelBuffer, maskInfo->mContentScaleFactor, maskInfo->mCropToMask );
- }
- }
if( pixelBuffer )
{
PreMultiply( pixelBuffer, preMultiplyOnLoad );
}
else
{
- TextureId alphaMaskId = RequestMaskLoad( maskInfo->mAlphaMaskUrl );
textureId = RequestLoad( url,
- alphaMaskId,
+ maskInfo->mAlphaMaskId,
maskInfo->mContentScaleFactor,
desiredSize,
fittingMode, samplingMode,