Index: tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp |
diff --git a/tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp b/tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp |
index 7194e805bf36dc859a2250f841f8a53a45b4293d..a96da7c6b661b363515c0132011e06a4442f5d16 100644 |
--- a/tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp |
+++ b/tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp |
@@ -73,14 +73,14 @@ bool SkDifferentPixelsMetric::diff(SkBitmap* baseline, SkBitmap* test, |
if (baselinePixel != testPixel) { |
result->poiCount++; |
- int redDiff = abs(static_cast<int>(SkColorGetR(baselinePixel) - |
- SkColorGetR(testPixel))); |
+ int redDiff = SkTAbs(static_cast<int>(SkColorGetR(baselinePixel) - |
+ SkColorGetR(testPixel))); |
if (redDiff > maxRedDiff) {maxRedDiff = redDiff;} |
- int greenDiff = abs(static_cast<int>(SkColorGetG(baselinePixel) - |
- SkColorGetG(testPixel))); |
+ int greenDiff = SkTAbs(static_cast<int>(SkColorGetG(baselinePixel) - |
+ SkColorGetG(testPixel))); |
if (greenDiff > maxGreenDiff) {maxGreenDiff = greenDiff;} |
- int blueDiff = abs(static_cast<int>(SkColorGetB(baselinePixel) - |
- SkColorGetB(testPixel))); |
+ int blueDiff = SkTAbs(static_cast<int>(SkColorGetB(baselinePixel) - |
+ SkColorGetB(testPixel))); |
if (blueDiff > maxBlueDiff) {maxBlueDiff = blueDiff;} |
if (bitmapsToCreate.alphaMask) { |