diff options
Diffstat (limited to 'tests/PremulAlphaRoundTripTest.cpp')
-rw-r--r-- | tests/PremulAlphaRoundTripTest.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/PremulAlphaRoundTripTest.cpp b/tests/PremulAlphaRoundTripTest.cpp index a22ff5ae13..f2f1613d95 100644 --- a/tests/PremulAlphaRoundTripTest.cpp +++ b/tests/PremulAlphaRoundTripTest.cpp @@ -95,10 +95,11 @@ void PremulAlphaRoundTripTest(skiatest::Reporter* reporter, reinterpret_cast<uint32_t*>(readBmp1.getPixels()); uint32_t* pixels2 = reinterpret_cast<uint32_t*>(readBmp2.getPixels()); - for (int y = 0; y < 256; ++y) { - for (int x = 0; x < 256; ++x) { + bool success = true; + for (int y = 0; y < 256 && success; ++y) { + for (int x = 0; x < 256 && success; ++x) { int i = y * 256 + x; - REPORTER_ASSERT(reporter, pixels1[i] == pixels2[i]); + REPORTER_ASSERT(reporter, success = pixels1[i] == pixels2[i]); } } } |