aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ImageTest.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp
index 020e322f91..45681be648 100644
--- a/tests/ImageTest.cpp
+++ b/tests/ImageTest.cpp
@@ -1016,8 +1016,12 @@ static bool equal(const SkBitmap& a, const SkBitmap& b) {
SkASSERT(a.width() == b.width());
SkASSERT(a.height() == b.height());
for (int y = 0; y < a.height(); ++y) {
- if (0 != memcmp(a.getAddr32(0, y), b.getAddr32(0, y), a.width() * sizeof(SkPMColor))) {
- return false;
+ for (int x = 0; x < a.width(); ++x) {
+ SkPMColor pa = *a.getAddr32(x, y);
+ SkPMColor pb = *b.getAddr32(x, y);
+ if (pa != pb) {
+ return false;
+ }
}
}
return true;