Bug 1366434 - Part 3. Fix comment error in ComputeLinearRGBLuminanceMask. draft
authorcku <cku@mozilla.com>
Tue, 23 May 2017 17:51:55 +0800
changeset 582983 d9fdae3a824dd7e2f0b52a85fd64cea8d4760a14
parent 582982 0a7bcd2ebdd994dfcdaceaeca455818be7990909
child 629924 df317cc6f3b7445f5eda5b927320d9ae75faebe6
push id60249
push userbmo:cku@mozilla.com
push dateTue, 23 May 2017 12:57:15 +0000
bugs1366434
milestone55.0a1
Bug 1366434 - Part 3. Fix comment error in ComputeLinearRGBLuminanceMask. MozReview-Commit-ID: AuDW9Cc6aoT
layout/svg/nsSVGMaskFrame.cpp
--- a/layout/svg/nsSVGMaskFrame.cpp
+++ b/layout/svg/nsSVGMaskFrame.cpp
@@ -73,19 +73,19 @@ ComputesRGBLuminanceMask(const uint8_t *
   if (mozilla::supports_neon()) {
     ComputesRGBLuminanceMask_NEON(aSourceData, aSourceStride,
                                   aDestData, aDestStride,
                                   aSize, aOpacity);
     return;
   }
 #endif
 
-  int32_t redFactor = 55 * aOpacity; // 255 * 0.2125 * opacity
+  int32_t redFactor = 55 * aOpacity;    // 255 * 0.2125 * opacity
   int32_t greenFactor = 183 * aOpacity; // 255 * 0.7154 * opacity
-  int32_t blueFactor = 18 * aOpacity; // 255 * 0.0721
+  int32_t blueFactor = 18 * aOpacity;   // 255 * 0.0721 * opacity
   int32_t sourceOffset = aSourceStride - 4 * aSize.width;
   const uint8_t *sourcePixel = aSourceData;
   int32_t destOffset = aDestStride - aSize.width;
   uint8_t *destPixel = aDestData;
 
   for (int32_t y = 0; y < aSize.height; y++) {
     for (int32_t x = 0; x < aSize.width; x++) {
       uint8_t a = sourcePixel[GFX_ARGB32_OFFSET_A];
@@ -108,19 +108,19 @@ ComputesRGBLuminanceMask(const uint8_t *
 static void
 ComputeLinearRGBLuminanceMask(const uint8_t *aSourceData,
                               int32_t aSourceStride,
                               uint8_t *aDestData,
                               int32_t aDestStride,
                               const IntSize &aSize,
                               float aOpacity)
 {
-  int32_t redFactor = 55 * aOpacity; // 255 * 0.2125 * opacity
+  int32_t redFactor = 55 * aOpacity;    // 255 * 0.2125 * opacity
   int32_t greenFactor = 183 * aOpacity; // 255 * 0.7154 * opacity
-  int32_t blueFactor = 18 * aOpacity; // 255 * 0.0721
+  int32_t blueFactor = 18 * aOpacity;   // 255 * 0.0721 * opacity
   int32_t sourceOffset = aSourceStride - 4 * aSize.width;
   const uint8_t *sourcePixel = aSourceData;
   int32_t destOffset = aDestStride - aSize.width;
   uint8_t *destPixel = aDestData;
 
   for (int32_t y = 0; y < aSize.height; y++) {
     for (int32_t x = 0; x < aSize.width; x++) {
       uint8_t a = sourcePixel[GFX_ARGB32_OFFSET_A];