mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 844511 - Only luminance masks need unpremultiplying and conversion to linear RGB. r=longsonr
This commit is contained in:
parent
839b6f3f26
commit
7191580b25
@ -114,14 +114,14 @@ nsSVGMaskFrame::ComputeMaskAlpha(nsRenderingContext *aContext,
|
||||
uint8_t *data = image->Data();
|
||||
int32_t stride = image->Stride();
|
||||
|
||||
nsIntRect rect(0, 0, surfaceSize.width, surfaceSize.height);
|
||||
nsSVGUtils::UnPremultiplyImageDataAlpha(data, stride, rect);
|
||||
if (StyleSVG()->mColorInterpolation ==
|
||||
NS_STYLE_COLOR_INTERPOLATION_LINEARRGB) {
|
||||
nsSVGUtils::ConvertImageDataToLinearRGB(data, stride, rect);
|
||||
}
|
||||
|
||||
if (StyleSVGReset()->mMaskType == NS_STYLE_MASK_TYPE_LUMINANCE) {
|
||||
nsIntRect rect(0, 0, surfaceSize.width, surfaceSize.height);
|
||||
nsSVGUtils::UnPremultiplyImageDataAlpha(data, stride, rect);
|
||||
if (StyleSVG()->mColorInterpolation ==
|
||||
NS_STYLE_COLOR_INTERPOLATION_LINEARRGB) {
|
||||
nsSVGUtils::ConvertImageDataToLinearRGB(data, stride, rect);
|
||||
}
|
||||
|
||||
for (int32_t y = 0; y < surfaceSize.height; y++) {
|
||||
for (int32_t x = 0; x < surfaceSize.width; x++) {
|
||||
uint8_t *pixel = data + stride * y + 4 * x;
|
||||
|
Loading…
Reference in New Issue
Block a user