aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-05-22 08:06:21 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-22 08:06:22 -0700
commit92fc2ae58331662ec411a048686cb4801e0a909a (patch)
tree8b49c125bd366e77fcdff77788e6965912758dc9 /tests
parenteb1cb5c5b50febad115d859faca91d2d6af3fff2 (diff)
add SkPixmap and external locking to bitmaps
Diffstat (limited to 'tests')
-rw-r--r--tests/BitmapCopyTest.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp
index eb7c663254..1cb2944e99 100644
--- a/tests/BitmapCopyTest.cpp
+++ b/tests/BitmapCopyTest.cpp
@@ -161,18 +161,15 @@ static void reportCopyVerification(const SkBitmap& bm1, const SkBitmap& bm2,
Coordinates& coords,
const char* msg,
skiatest::Reporter* reporter){
- bool success = true;
-
// Confirm all pixels in the list match.
for (int i = 0; i < coords.length; ++i) {
- success = success &&
- (getPixel(coords[i]->fX, coords[i]->fY, bm1) ==
- getPixel(coords[i]->fX, coords[i]->fY, bm2));
- }
-
- if (!success) {
- ERRORF(reporter, "%s [colortype = %s]", msg,
- gColorTypeName[bm1.colorType()]);
+ uint32_t p1 = getPixel(coords[i]->fX, coords[i]->fY, bm1);
+ uint32_t p2 = getPixel(coords[i]->fX, coords[i]->fY, bm2);
+// SkDebugf("[%d] (%d %d) p1=%x p2=%x\n", i, coords[i]->fX, coords[i]->fY, p1, p2);
+ if (p1 != p2) {
+ ERRORF(reporter, "%s [colortype = %s]", msg, gColorTypeName[bm1.colorType()]);
+ break;
+ }
}
}