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

Unified Diff: cc/test/pixel_test.cc

Issue 12558003: cc: Made image comparison for pixel tests error tolerant. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to tip of tree. Added discard_alpha flag. Created 7 years, 9 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
Index: cc/test/pixel_test.cc
diff --git a/cc/test/pixel_test.cc b/cc/test/pixel_test.cc
index 5d586a2d132f18a99cb7a00d6d07c3caa11aed8c..da96c16826bca3b981dfa942082d2303039ef731 100644
--- a/cc/test/pixel_test.cc
+++ b/cc/test/pixel_test.cc
@@ -76,7 +76,7 @@ void PixelTest::SetUp() {
}
bool PixelTest::PixelsMatchReference(const base::FilePath& ref_file,
- bool discard_transparency) {
+ const PixelComparator& comparator) {
gfx::Rect device_viewport_rect(device_viewport_size_);
SkBitmap bitmap;
@@ -94,8 +94,7 @@ bool PixelTest::PixelsMatchReference(const base::FilePath& ref_file,
// To rebaseline:
// return WritePNGFile(bitmap, test_data_dir.Append(ref_file));
- return IsSameAsPNGFile(bitmap, test_data_dir.Append(ref_file),
- discard_transparency);
+ return MatchesPNGFile(bitmap, test_data_dir.Append(ref_file), comparator);
}
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698