namespace
{
-// property names
-const char * const IMAGE_FITTING_MODE( "fittingMode" );
-const char * const IMAGE_SAMPLING_MODE( "samplingMode" );
-const char * const IMAGE_DESIRED_WIDTH( "desiredWidth" );
-const char * const IMAGE_DESIRED_HEIGHT( "desiredHeight" );
-const char * const SYNCHRONOUS_LOADING( "synchronousLoading" );
-const char * const IMAGE_ATLASING("atlasing");
-const char * const ALPHA_MASK_URL("alphaMaskUrl");
-
// fitting modes
DALI_ENUM_TO_STRING_TABLE_BEGIN( FITTING_MODE )
DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::FittingMode, SHRINK_TO_FIT )
mLoading( false ),
mOrientationCorrection( true )
{
- EnablePreMultipliedAlpha( mFactoryCache.GetPreMultiplyOnLoad() );
+ // PreMultiplied alpha should be disabled when the Image is used.
+ EnablePreMultipliedAlpha( false );
}
ImageVisual::~ImageVisual()
mImpl->mTransform.RegisterUniforms( mImpl->mRenderer, Direction::LEFT_TO_RIGHT );
}
-bool ImageVisual::IsSynchronousResourceLoading() const
-{
- return mImpl->mFlags & Impl::IS_SYNCHRONOUS_RESOURCE_LOADING;
-}
-
void ImageVisual::LoadTexture( bool& atlasing, Vector4& atlasRect, TextureSet& textures, bool orientationCorrection,
TextureManager::ReloadPolicy forceReload )
{
: TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY;
textures = textureManager.LoadTexture( mImageUrl, mDesiredSize, mFittingMode, mSamplingMode,
- mMaskingData, IsSynchronousResourceLoading(), mTextureId,
+ mMaskingData, IsSynchronousLoadingRequired(), mTextureId,
atlasRect, mAtlasRectSize, atlasing, mLoading, mWrapModeU,
mWrapModeV, textureObserver, atlasUploadObserver, atlasManager,
mOrientationCorrection, forceReload, preMultiplyOnLoad);
map.Clear();
map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE );
- bool sync = IsSynchronousResourceLoading();
+ bool sync = IsSynchronousLoadingRequired();
map.Insert( SYNCHRONOUS_LOADING, sync );
if( mImageUrl.IsValid() )
{