Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp

Issue 1313203003: Remove include of stdlib.h from SkTypes.h. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up qsort conversion. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/skdiff_main.cpp ('k') | tools/skpmaker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « tools/skdiff_main.cpp ('k') | tools/skpmaker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698