Bug 1121869 - Fix neon command compile problem on gcc4.6. r=longsonr
authorEthan Lin <etlin@mozilla.com>
Mon, 19 Jan 2015 18:48:00 -0500
changeset 224824 e1a9476d44f648334be746c936362f02065003b2
parent 224823 684267d1eaf46ccbad162fa1f236b5733eba7f04
child 224825 741ba2a22877c49968d75dfbb7571d02a53d55ce
push id54355
push userryanvm@gmail.com
push dateWed, 21 Jan 2015 05:16:31 +0000
treeherdermozilla-inbound@741ba2a22877 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslongsonr
bugs1121869
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1121869 - Fix neon command compile problem on gcc4.6. r=longsonr
layout/svg/nsSVGMaskFrameNEON.cpp
--- a/layout/svg/nsSVGMaskFrameNEON.cpp
+++ b/layout/svg/nsSVGMaskFrameNEON.cpp
@@ -26,29 +26,29 @@ ComputesRGBLuminanceMask_NEON(const uint
   sourcePixel = aSourceData;
   int32_t remainderWidth = aSize.width % 8;
   int32_t roundedWidth = aSize.width - remainderWidth;
   uint16x8_t temp;
   uint8x8_t gray;
   uint8x8_t redVector = vdup_n_u8(redFactor);
   uint8x8_t greenVector = vdup_n_u8(greenFactor);
   uint8x8_t blueVector = vdup_n_u8(blueFactor);
-  uint8x8_t zeroVector = vdup_n_u8(0);
+  uint8x8_t fullBitVector = vdup_n_u8(255);
   uint8x8_t oneVector = vdup_n_u8(1);
   for (int32_t y = 0; y < aSize.height; y++) {
     // Calculate luminance by neon with 8 pixels per loop
     for (int32_t x = 0; x < roundedWidth; x += 8) {
       uint8x8x4_t argb  = vld4_u8(sourcePixel);
       temp = vmull_u8(argb.val[GFX_ARGB32_OFFSET_R], redVector); // temp = red * redFactor
       temp = vmlal_u8(temp, argb.val[GFX_ARGB32_OFFSET_G], greenVector); // temp += green * greenFactor
       temp = vmlal_u8(temp, argb.val[GFX_ARGB32_OFFSET_B], blueVector); // temp += blue * blueFactor
       gray = vshrn_n_u16(temp, 8); // gray = temp >> 8
 
       // Check alpha value
-      uint8x8_t alphaVector = vcgt_u8(argb.val[GFX_ARGB32_OFFSET_A], zeroVector);
+      uint8x8_t alphaVector = vtst_u8(argb.val[GFX_ARGB32_OFFSET_A], fullBitVector);
       gray = vmul_u8(gray, vand_u8(alphaVector, oneVector));
 
       // Put the result to the 8 pixels
       vst1_u8(destPixel, gray);
       sourcePixel += 8 * 4;
       destPixel += 8;
     }