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

Issue 1860823003: Enhance unit tests for normals. (Closed)

Created:
4 years, 8 months ago by Peter Mayo
Modified:
4 years, 8 months ago
Reviewers:
Ian Vollick
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Enhance unit tests for normals. We asserted that changing vertex winding shouldn't change a polygon's normal when it doesn't have to. We asserted that inversion on the X axis (or Y-Axis) should change the normal, but it shouldn't. We also tested the normal calculation of degenerate polygons (colinear vertices) when these don't have to work, and weren't what the test was claiming to check. This introduces DISABLED tests to fix, separates the set of normal calculations into separate tests so that failures are reported better, and uses better formed polygons for the touching and splitting test cases. BUG=595820 TEST=self CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/94858ade402cdf1fec143c154d600ee7b17c3557 Cr-Commit-Position: refs/heads/master@{#386470}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix comments from me. #

Total comments: 2

Patch Set 3 : Remove BackwardsWoundNormal Test #

Patch Set 4 : rebased #

Total comments: 2

Patch Set 5 : Fix degenerate polys #

Patch Set 6 : Rebase #

Patch Set 7 : Rebase #

Total comments: 1

Patch Set 8 : Added a comment for the DISABLED test with a direct bug #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -27 lines) Patch
M cc/quads/draw_polygon_unittest.cc View 1 2 3 4 5 6 7 4 chunks +64 lines, -27 lines 0 comments Download

Messages

Total messages: 26 (7 generated)
Peter Mayo
Simple setup for future fix.
4 years, 8 months ago (2016-04-05 18:11:12 UTC) #3
Peter Mayo
https://codereview.chromium.org/1860823003/diff/1/cc/quads/draw_polygon_unittest.cc File cc/quads/draw_polygon_unittest.cc (right): https://codereview.chromium.org/1860823003/diff/1/cc/quads/draw_polygon_unittest.cc#newcode140 cc/quads/draw_polygon_unittest.cc:140: gfx::Transform tranform_a(0, 1, 0, 0, 1, 0, 0, 0, ...
4 years, 8 months ago (2016-04-05 21:56:07 UTC) #4
Ian Vollick
https://codereview.chromium.org/1860823003/diff/20001/cc/quads/draw_polygon_unittest.cc File cc/quads/draw_polygon_unittest.cc (right): https://codereview.chromium.org/1860823003/diff/20001/cc/quads/draw_polygon_unittest.cc#newcode85 cc/quads/draw_polygon_unittest.cc:85: EXPECT_NORMAL(polygon, 0.0f, 0.0f, 1.0f); This is surprising to me. ...
4 years, 8 months ago (2016-04-06 12:32:22 UTC) #5
Peter Mayo
https://codereview.chromium.org/1860823003/diff/20001/cc/quads/draw_polygon_unittest.cc File cc/quads/draw_polygon_unittest.cc (right): https://codereview.chromium.org/1860823003/diff/20001/cc/quads/draw_polygon_unittest.cc#newcode85 cc/quads/draw_polygon_unittest.cc:85: EXPECT_NORMAL(polygon, 0.0f, 0.0f, 1.0f); On 2016/04/06 12:32:22, vollick wrote: ...
4 years, 8 months ago (2016-04-06 14:05:00 UTC) #6
Ian Vollick
On 2016/04/06 14:05:00, Peter Mayo wrote: > https://codereview.chromium.org/1860823003/diff/20001/cc/quads/draw_polygon_unittest.cc > File cc/quads/draw_polygon_unittest.cc (right): > > https://codereview.chromium.org/1860823003/diff/20001/cc/quads/draw_polygon_unittest.cc#newcode85 ...
4 years, 8 months ago (2016-04-06 14:11:05 UTC) #7
Ian Vollick
On 2016/04/06 14:11:05, vollick wrote: > On 2016/04/06 14:05:00, Peter Mayo wrote: > > > ...
4 years, 8 months ago (2016-04-06 14:12:38 UTC) #8
chromium-reviews
One of the constructors (the one being exercised here) has points and a normal, but ...
4 years, 8 months ago (2016-04-06 14:13:34 UTC) #9
Peter Mayo
On 2016/04/06 14:13:34, chromium-reviews wrote: > One of the constructors (the one being exercised here) ...
4 years, 8 months ago (2016-04-06 14:15:44 UTC) #10
Peter Mayo
rebased
4 years, 8 months ago (2016-04-06 17:06:11 UTC) #11
Peter Mayo
https://codereview.chromium.org/1860823003/diff/60001/cc/quads/draw_polygon_unittest.cc File cc/quads/draw_polygon_unittest.cc (right): https://codereview.chromium.org/1860823003/diff/60001/cc/quads/draw_polygon_unittest.cc#newcode246 cc/quads/draw_polygon_unittest.cc:246: vertices_b.push_back(gfx::Point3F(5.0f, 0.0f, 15.0f)); This is a degenerate polygon (line) ...
4 years, 8 months ago (2016-04-06 21:01:09 UTC) #12
Peter Mayo
Fix degenerate polys
4 years, 8 months ago (2016-04-07 00:27:47 UTC) #13
Peter Mayo
Rebase
4 years, 8 months ago (2016-04-08 14:52:33 UTC) #14
Peter Mayo
Rebase
4 years, 8 months ago (2016-04-11 15:02:07 UTC) #15
Peter Mayo
Ping.
4 years, 8 months ago (2016-04-11 15:08:00 UTC) #17
Ian Vollick
lgtm. https://codereview.chromium.org/1860823003/diff/120001/cc/quads/draw_polygon_unittest.cc File cc/quads/draw_polygon_unittest.cc (right): https://codereview.chromium.org/1860823003/diff/120001/cc/quads/draw_polygon_unittest.cc#newcode134 cc/quads/draw_polygon_unittest.cc:134: Would be nice to add a comment with ...
4 years, 8 months ago (2016-04-11 16:50:18 UTC) #18
Peter Mayo
Added a comment for the DISABLED test with a direct bug
4 years, 8 months ago (2016-04-11 19:40:33 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1860823003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1860823003/140001
4 years, 8 months ago (2016-04-11 20:20:59 UTC) #22
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 8 months ago (2016-04-11 21:04:54 UTC) #24
commit-bot: I haz the power
4 years, 8 months ago (2016-04-11 21:07:58 UTC) #26
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/94858ade402cdf1fec143c154d600ee7b17c3557
Cr-Commit-Position: refs/heads/master@{#386470}

Powered by Google App Engine
This is Rietveld 408576698