Modify Read/WritePixelTests to print one pixel failure for each test case rather than every pixel

Review URL: http://codereview.appspot.com/6450154/



git-svn-id: http://skia.googlecode.com/svn/trunk@5147 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp
index a0eee04..67bb659 100644
--- a/tests/ReadPixelsTest.cpp
+++ b/tests/ReadPixelsTest.cpp
@@ -181,7 +181,6 @@
     if (!clippedSrcRect.intersect(srcRect)) {
         clippedSrcRect.setEmpty();
     }
-    bool failed = false;
     SkAutoLockPixels alp(bitmap);
     intptr_t pixels = reinterpret_cast<intptr_t>(bitmap.getPixels());
     for (int by = 0; by < bh; ++by) {
@@ -199,18 +198,18 @@
                     bool check;
                     REPORTER_ASSERT(reporter, check = checkPixel(pmPixel, canvasPixel, didPremul));
                     if (!check) {
-                        failed = true;
+                        return false;
                     }
                 }
             } else if (checkBitmapPixels) {
                 REPORTER_ASSERT(reporter, getBitmapColor(bx, by, bw, bh) == pixel);
                 if (getBitmapColor(bx, by, bw, bh) != pixel) {
-                    failed = true;
+                    return false;
                 }
             }
         }
     }
-    return !failed;
+    return true;
 }
 
 enum BitmapInit {