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

Unified Diff: tests/ImageDecodingTest.cpp

Issue 17084012: Fixes for unpremul decode. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 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/ports/SkImageDecoder_CG.cpp ('K') | « src/ports/SkImageDecoder_CG.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
}
« src/ports/SkImageDecoder_CG.cpp ('K') | « src/ports/SkImageDecoder_CG.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698