mImpl->mRenderer.SetTextures(mTextures);
ComputeTextureSize();
CheckMaskTexture();
- if(DevelTexture::IsNative(mTextures.GetTexture(0)))
+
+ bool needToUpdateShader = DevelTexture::IsNative(mTextures.GetTexture(0));
+
+ if(mTextures.GetTextureCount() == 3)
+ {
+ if(mTextures.GetTexture(0).GetPixelFormat() == Pixel::L8 && mTextures.GetTexture(1).GetPixelFormat() == Pixel::CHROMINANCE_U && mTextures.GetTexture(2).GetPixelFormat() == Pixel::CHROMINANCE_V)
+ {
+ mNeedYuvToRgb = true;
+ needToUpdateShader = true;
+ }
+ }
+
+ if(needToUpdateShader)
{
UpdateShader();
}
mImpl->mRenderer.SetTextures(textureInformation.textureSet);
ComputeTextureSize();
CheckMaskTexture();
+
+ if(textureInformation.textureSet.GetTextureCount() == 3)
+ {
+ if(textureInformation.textureSet.GetTexture(0).GetPixelFormat() == Pixel::L8 && textureInformation.textureSet.GetTexture(1).GetPixelFormat() == Pixel::CHROMINANCE_U && textureInformation.textureSet.GetTexture(2).GetPixelFormat() == Pixel::CHROMINANCE_V)
+ {
+ mNeedYuvToRgb = true;
+ UpdateShader();
+ }
+ }
}
if(actor)
.EnableRoundedCorner(IsRoundedCornerRequired())
.EnableBorderline(IsBorderlineRequired())
.SetTextureForFragmentShaderCheck(useNativeImage ? mTextures.GetTexture(0) : Dali::Texture())
- .EnableAlphaMaskingOnRendering(requiredAlphaMaskingOnRendering));
+ .EnableAlphaMaskingOnRendering(requiredAlphaMaskingOnRendering)
+ .EnableYuvToRgb(mNeedYuvToRgb));
}
else
{