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

Unified Diff: tests/BitmapCopyTest.cpp

Issue 1074983003: add SkPixmap and external locking to bitmaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 7 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
« src/core/SkPixelRef.cpp ('K') | « src/core/SkWriteBuffer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/BitmapCopyTest.cpp
diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp
index eb7c663254af2962b13cb9bd90c92f1eaf893de4..1cb2944e991738ff36a01d7911f873559b6c8313 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;
+ }
}
}
« src/core/SkPixelRef.cpp ('K') | « src/core/SkWriteBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698