Index: dm/DMUtil.cpp |
diff --git a/dm/DMUtil.cpp b/dm/DMUtil.cpp |
index d7d6691550b2113b4991d157c68d9155f8a7e453..f142d47dda23f506b7fcc2b546ca2281fcacc256 100644 |
--- a/dm/DMUtil.cpp |
+++ b/dm/DMUtil.cpp |
@@ -84,7 +84,11 @@ unsigned MaxComponentDifference(const SkBitmap& a, const SkBitmap& b) { |
} |
bool BitmapsEqual(const SkBitmap& a, const SkBitmap& b) { |
- return a.info() == b.info() && 0 == MaxComponentDifference(a, b); |
+ if (a.info() != b.info()) { |
+ return false; |
+ } |
+ const SkAutoLockPixels lockA(a), lockB(b); |
+ return 0 == memcmp(a.getPixels(), b.getPixels(), a.getSize()); |
} |
} // namespace DM |