Convert alpha from [0..1] to [0.255] range
Bug #8808886 Without this conversion, alpha was always set to 0 or 1 which causes things to disappear mysteriously. Mysteries are meant to be solved and I solved them all in 6 characters. Change-Id: I2078420fbe968c046e999b0eabb24403e71108fd
This commit is contained in:
@ -3535,7 +3535,7 @@ void OpenGLRenderer::getAlphaAndMode(SkPaint* paint, int* alpha, SkXfermode::Mod
|
||||
getAlphaAndModeDirect(paint, alpha, mode);
|
||||
if (mDrawModifiers.mOverrideLayerAlpha < 1.0f) {
|
||||
// if drawing a layer, ignore the paint's alpha
|
||||
*alpha = mDrawModifiers.mOverrideLayerAlpha;
|
||||
*alpha = mDrawModifiers.mOverrideLayerAlpha * 255;
|
||||
}
|
||||
*alpha *= mSnapshot->alpha;
|
||||
}
|
||||
|
Reference in New Issue
Block a user