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

Issue 12558003: cc: Made image comparison for pixel tests error tolerant. (Closed)

Created:
7 years, 9 months ago by ernstm
Modified:
7 years, 9 months ago
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

cc: Made image comparison for pixel tests error tolerant. Added PixelComparator interface and two implementations of it: ExactPixelComparator and FuzzyPixelComparator. The FuzzyPixelComparator tolerates an adjustable amount of error in the image. BUG=180460 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=191288

Patch Set 1 #

Total comments: 6

Patch Set 2 : Introduced PixelComparator interface. Refactored code. #

Total comments: 20

Patch Set 3 : Code cleanups #

Total comments: 10

Patch Set 4 : Rebase to tip of tree #

Patch Set 5 : Added 'virtual' keyword to method overrides. #

Patch Set 6 : Added missing OVERRIDE keywords. #

Patch Set 7 : Updatd layer_unitests.cc to use new MatchesPNGFile instead of IsSameAsPNGFile #

Patch Set 8 : Rebase to tip of tree. Added discard_alpha flag. #

Total comments: 8

Patch Set 9 : Added output of error pixel details. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+329 lines, -56 lines) Patch
M cc/cc_tests.gyp View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M cc/output/gl_renderer_pixeltest.cc View 1 2 3 4 5 6 7 6 chunks +11 lines, -6 lines 0 comments Download
M cc/test/layer_tree_pixel_test.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
A cc/test/pixel_comparator.h View 1 2 3 4 5 6 7 8 1 chunk +71 lines, -0 lines 0 comments Download
A cc/test/pixel_comparator.cc View 1 2 3 4 5 6 7 8 1 chunk +213 lines, -0 lines 0 comments Download
M cc/test/pixel_test.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M cc/test/pixel_test.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download
M cc/test/pixel_test_utils.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -4 lines 0 comments Download
M cc/test/pixel_test_utils.cc View 1 2 3 4 5 6 7 1 chunk +13 lines, -34 lines 0 comments Download
M ui/compositor/layer_unittest.cc View 1 2 3 4 5 6 7 3 chunks +7 lines, -7 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
reveman
Would it be cleaner and more extensible if we just had a Comparator interface and ...
7 years, 9 months ago (2013-03-07 07:50:44 UTC) #1
ernstm
Good suggestions. I refactored the code to use the PixelComparator interface. I split the ImageComparator ...
7 years, 9 months ago (2013-03-07 19:28:30 UTC) #2
ernstm
https://codereview.chromium.org/12558003/diff/1/cc/test/image_comparator.cc File cc/test/image_comparator.cc (right): https://codereview.chromium.org/12558003/diff/1/cc/test/image_comparator.cc#newcode70 cc/test/image_comparator.cc:70: bitmap_a.height() != bitmap_b.height()) { Moved all dimension checking into ...
7 years, 9 months ago (2013-03-07 19:30:07 UTC) #3
reveman
nice re-factor https://codereview.chromium.org/12558003/diff/5001/cc/test/pixel_comparator.cc File cc/test/pixel_comparator.cc (right): https://codereview.chromium.org/12558003/diff/5001/cc/test/pixel_comparator.cc#newcode15 cc/test/pixel_comparator.cc:15: { { should be on previous line ...
7 years, 9 months ago (2013-03-07 21:41:25 UTC) #4
ernstm
https://codereview.chromium.org/12558003/diff/5001/cc/test/pixel_comparator.cc File cc/test/pixel_comparator.cc (right): https://codereview.chromium.org/12558003/diff/5001/cc/test/pixel_comparator.cc#newcode15 cc/test/pixel_comparator.cc:15: { On 2013/03/07 21:41:25, David Reveman wrote: > { ...
7 years, 9 months ago (2013-03-08 00:14:46 UTC) #5
reveman
lgtm but have jamesr review this before landing https://codereview.chromium.org/12558003/diff/11001/cc/test/pixel_comparator.cc File cc/test/pixel_comparator.cc (right): https://codereview.chromium.org/12558003/diff/11001/cc/test/pixel_comparator.cc#newcode118 cc/test/pixel_comparator.cc:118: if ...
7 years, 9 months ago (2013-03-08 04:41:57 UTC) #6
slavi
https://codereview.chromium.org/12558003/diff/11001/cc/test/pixel_comparator.cc File cc/test/pixel_comparator.cc (right): https://codereview.chromium.org/12558003/diff/11001/cc/test/pixel_comparator.cc#newcode100 cc/test/pixel_comparator.cc:100: std::max(SkColorGetR(actual_color), SkColorGetR(expected_color)) - Why not std::abs(SkColorGetR(actual_color) - SkColorGetR(expected_color)) ? ...
7 years, 9 months ago (2013-03-08 19:49:04 UTC) #7
danakj
This will need a rebase, but I'd like to use this in my background blur ...
7 years, 9 months ago (2013-03-18 17:45:22 UTC) #8
ernstm
Rebase to tip of tree. Made changes requested by slavi and reveman. https://codereview.chromium.org/12558003/diff/11001/cc/gl_renderer_pixeltest.cc File cc/gl_renderer_pixeltest.cc ...
7 years, 9 months ago (2013-03-18 20:19:39 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ernstm@chromium.org/12558003/30001
7 years, 9 months ago (2013-03-27 20:48:32 UTC) #10
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 9 months ago (2013-03-27 21:00:56 UTC) #11
ernstm
Updatd layer_unitests.cc to use new cc::MatchesPNGFile instead of cc::IsSameAsPNGFile
7 years, 9 months ago (2013-03-27 21:50:43 UTC) #12
piman
lgtm
7 years, 9 months ago (2013-03-28 20:22:47 UTC) #13
ernstm
Rebase to tip of tree. Added discard_alpha flag.
7 years, 9 months ago (2013-03-28 22:03:41 UTC) #14
danakj
LGTM+nits https://codereview.chromium.org/12558003/diff/41001/cc/test/pixel_comparator.cc File cc/test/pixel_comparator.cc (right): https://codereview.chromium.org/12558003/diff/41001/cc/test/pixel_comparator.cc#newcode39 cc/test/pixel_comparator.cc:39: ++error_pixels_count; How about logging the pixel differences here ...
7 years, 9 months ago (2013-03-28 22:17:24 UTC) #15
danakj
https://codereview.chromium.org/12558003/diff/41001/cc/test/pixel_comparator.cc File cc/test/pixel_comparator.cc (right): https://codereview.chromium.org/12558003/diff/41001/cc/test/pixel_comparator.cc#newcode39 cc/test/pixel_comparator.cc:39: ++error_pixels_count; On 2013/03/28 22:17:25, danakj wrote: > How about ...
7 years, 9 months ago (2013-03-28 22:18:57 UTC) #16
ernstm
Added detailed logging of error pixels. Made coding style changes requested in #15. https://codereview.chromium.org/12558003/diff/41001/cc/test/pixel_comparator.cc File ...
7 years, 9 months ago (2013-03-28 23:10:26 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ernstm@chromium.org/12558003/50001
7 years, 9 months ago (2013-03-28 23:18:59 UTC) #18
commit-bot: I haz the power
7 years, 9 months ago (2013-03-29 04:09:52 UTC) #19
Message was sent while issue was closed.
Change committed as 191288

Powered by Google App Engine
This is Rietveld 408576698