Index: tests/ImageDecodingTest.cpp |
diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp |
index f30a0b25b7c115eed29990fb780ad1d373b95360..9a5d45bcfa7f34a5f0951bdeb2f3aa75b1034fcc 100644 |
--- a/tests/ImageDecodingTest.cpp |
+++ b/tests/ImageDecodingTest.cpp |
@@ -123,12 +123,11 @@ static void compare_unpremul(skiatest::Reporter* reporter, const SkString& filen |
// Alpha component must be exactly the same. |
REPORTER_ASSERT(reporter, 0 == da); |
- // Other components may differ if rounding is done differently, |
- // but currently that is not the case. If an image fails here |
- // in the future, we can change these to account for differences. |
- REPORTER_ASSERT(reporter, 0 == dr); |
- REPORTER_ASSERT(reporter, 0 == dg); |
- REPORTER_ASSERT(reporter, 0 == db); |
+ |
+ // Color components may not match exactly due to rounding error. |
+ REPORTER_ASSERT(reporter, dr <= 1); |
+ REPORTER_ASSERT(reporter, dg <= 1); |
+ REPORTER_ASSERT(reporter, db <= 1); |
} |
} |
} |