From 7191580b252ec7fe98336e007e15ee16e6d4caf4 Mon Sep 17 00:00:00 2001 From: O S K Chaitanya Date: Sun, 24 Feb 2013 09:05:09 +0000 Subject: [PATCH] Bug 844511 - Only luminance masks need unpremultiplying and conversion to linear RGB. r=longsonr --- layout/svg/nsSVGMaskFrame.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/layout/svg/nsSVGMaskFrame.cpp b/layout/svg/nsSVGMaskFrame.cpp index 53593ca44d6..8369747b4f1 100644 --- a/layout/svg/nsSVGMaskFrame.cpp +++ b/layout/svg/nsSVGMaskFrame.cpp @@ -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;