*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
uniform sampler2D sTexture;\n
uniform lowp vec4 uColor;\n
uniform lowp vec3 mixColor;\n
uniform sampler2D sTexture;\n
uniform lowp vec4 uColor;\n
uniform lowp vec3 mixColor;\n
uniform mediump vec4 uAtlasRect;\n
uniform lowp vec4 uColor;\n
uniform lowp vec3 mixColor;\n
uniform mediump vec4 uAtlasRect;\n
uniform lowp vec4 uColor;\n
uniform lowp vec3 mixColor;\n
void main()\n
{\n
mediump vec2 texCoord = clamp( mix( uAtlasRect.xy, uAtlasRect.zw, vTexCoord ), uAtlasRect.xy, uAtlasRect.zw );\n
void main()\n
{\n
mediump vec2 texCoord = clamp( mix( uAtlasRect.xy, uAtlasRect.zw, vTexCoord ), uAtlasRect.xy, uAtlasRect.zw );\n
uniform lowp vec2 wrapMode;\n
uniform lowp vec4 uColor;\n
uniform lowp vec3 mixColor;\n
uniform lowp vec2 wrapMode;\n
uniform lowp vec4 uColor;\n
uniform lowp vec3 mixColor;\n
uniform lowp float preMultipliedAlpha;\n
\n
mediump float wrapCoordinate( mediump vec2 range, mediump float coordinate, lowp float wrap )\n
uniform lowp float preMultipliedAlpha;\n
\n
mediump float wrapCoordinate( mediump vec2 range, mediump float coordinate, lowp float wrap )\n
return clamp( mix(range.x, range.y, coord), range.x, range.y );
}\n
\n
return clamp( mix(range.x, range.y, coord), range.x, range.y );
}\n
\n
void main()\n
{\n
mediump vec2 texCoord = vec2( wrapCoordinate( uAtlasRect.xz, vTexCoord.x, wrapMode.x ),
wrapCoordinate( uAtlasRect.yw, vTexCoord.y, wrapMode.y ) );\n
void main()\n
{\n
mediump vec2 texCoord = vec2( wrapCoordinate( uAtlasRect.xz, vTexCoord.x, wrapMode.x ),
wrapCoordinate( uAtlasRect.yw, vTexCoord.y, wrapMode.y ) );\n
ImageDimensions size,
FittingMode::Type fittingMode,
Dali::SamplingMode::Type samplingMode )
ImageDimensions size,
FittingMode::Type fittingMode,
Dali::SamplingMode::Type samplingMode )
//Register transform properties
mImpl->mTransform.RegisterUniforms( mImpl->mRenderer, Direction::LEFT_TO_RIGHT );
//Register transform properties
mImpl->mTransform.RegisterUniforms( mImpl->mRenderer, Direction::LEFT_TO_RIGHT );
bool ImageVisual::IsSynchronousResourceLoading() const
{
return mImpl->mFlags & Impl::IS_SYNCHRONOUS_RESOURCE_LOADING;
bool ImageVisual::IsSynchronousResourceLoading() const
{
return mImpl->mFlags & Impl::IS_SYNCHRONOUS_RESOURCE_LOADING;
textures = textureManager.LoadTexture( mImageUrl, mDesiredSize, mFittingMode, mSamplingMode,
mMaskingData, IsSynchronousResourceLoading(), mTextureId,
atlasRect, atlasing, mLoading, mWrapModeU,
mWrapModeV, textureObserver, atlasUploadObserver, atlasManager,
textures = textureManager.LoadTexture( mImageUrl, mDesiredSize, mFittingMode, mSamplingMode,
mMaskingData, IsSynchronousResourceLoading(), mTextureId,
atlasRect, atlasing, mLoading, mWrapModeU,
mWrapModeV, textureObserver, atlasUploadObserver, atlasManager,
- mOrientationCorrection,
- forceReload );
+ mOrientationCorrection, forceReload, preMultiplyOnLoad);
+
+ if( textures && preMultiplyOnLoad == TextureManager::MultiplyOnLoad::MULTIPLY_ON_LOAD)
+ {
+ EnablePreMultipliedAlpha( true );
+ }
// From Texture Manager
void ImageVisual::UploadComplete( bool loadingSuccess, int32_t textureId, TextureSet textureSet, bool usingAtlas,
// From Texture Manager
void ImageVisual::UploadComplete( bool loadingSuccess, int32_t textureId, TextureSet textureSet, bool usingAtlas,
actor.AddRenderer( mImpl->mRenderer );
// reset the weak handle so that the renderer only get added to actor once
actor.AddRenderer( mImpl->mRenderer );
// reset the weak handle so that the renderer only get added to actor once