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

Issue 2551263002: Don't add duplicate points when clipping (Closed)

Created:
4 years ago by Peter Mayo
Modified:
3 years, 11 months ago
Reviewers:
flackr, danakj
CC:
cc-bugs_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't add duplicate points when clipping Neighbours can clip to the same infinity. Using two of the same vertex in a polygon can cause the computed normal to be (0,0,0), which causes badness and failures. BUG=626095 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2551263002 Cr-Commit-Position: refs/heads/master@{#443296} Committed: https://chromium.googlesource.com/chromium/src/+/9dfe043a1722d857b7e92e4d646d974c4f76f5cf

Patch Set 1 #

Patch Set 2 : Rebased #

Patch Set 3 : First test #

Total comments: 7

Patch Set 4 : Add approximate truncation, with tests. #

Total comments: 9

Patch Set 5 : rebase #

Patch Set 6 : Readability and review changes #

Total comments: 14

Patch Set 7 : rebase #

Patch Set 8 : flackr comments #10 #

Total comments: 11

Patch Set 9 : flackr comments #12 #

Patch Set 10 : danakj comments #13 #

Patch Set 11 : danakj comments #15 #

Total comments: 2

Patch Set 12 : danakj comments #15-ii #

Patch Set 13 : danakj comments #15-iii #

Patch Set 14 : Move Test function into class for export #

Unified diffs Side-by-side diffs Delta from patch set Stats (+234 lines, -0 lines) Patch
M cc/base/math_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -0 lines 0 comments Download
M cc/base/math_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +56 lines, -0 lines 0 comments Download
M cc/base/math_util_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +172 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 39 (12 generated)
Peter Mayo
Another piece of fallout from debugging.
4 years ago (2016-12-05 21:27:36 UTC) #3
flackr
Looks good, can you add a test of such a case?
4 years ago (2016-12-06 19:04:01 UTC) #4
Peter Mayo
Added a first test. https://codereview.chromium.org/2551263002/diff/60001/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/2551263002/diff/60001/cc/base/math_util.cc#newcode162 cc/base/math_util.cc:162: if (clipped_quad[*num_vertices_in_clipped_quad - 1] == ...
4 years ago (2016-12-08 19:37:39 UTC) #5
flackr
https://codereview.chromium.org/2551263002/diff/60001/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/2551263002/diff/60001/cc/base/math_util.cc#newcode162 cc/base/math_util.cc:162: if (clipped_quad[*num_vertices_in_clipped_quad - 1] == new_vertex) On 2016/12/08 at ...
4 years ago (2016-12-08 20:24:01 UTC) #6
Peter Mayo
https://codereview.chromium.org/2551263002/diff/60001/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/2551263002/diff/60001/cc/base/math_util.cc#newcode162 cc/base/math_util.cc:162: if (clipped_quad[*num_vertices_in_clipped_quad - 1] == new_vertex) On 2016/12/08 20:24:01, ...
4 years ago (2016-12-08 20:29:09 UTC) #7
flackr
Just a few comments and naming suggestions. https://codereview.chromium.org/2551263002/diff/80001/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/2551263002/diff/80001/cc/base/math_util.cc#newcode158 cc/base/math_util.cc:158: static inline ...
4 years ago (2016-12-08 23:31:07 UTC) #8
Peter Mayo
PTAL, when you can. https://codereview.chromium.org/2551263002/diff/80001/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/2551263002/diff/80001/cc/base/math_util.cc#newcode158 cc/base/math_util.cc:158: static inline bool approx(const float ...
4 years ago (2016-12-14 23:13:11 UTC) #9
flackr
https://codereview.chromium.org/2551263002/diff/120001/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/2551263002/diff/120001/cc/base/math_util.cc#newcode159 cc/base/math_util.cc:159: static const float epsilon_scale = 0.00001f; nit: Can you ...
3 years, 11 months ago (2017-01-11 18:23:57 UTC) #10
Peter Mayo
https://codereview.chromium.org/2551263002/diff/120001/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/2551263002/diff/120001/cc/base/math_util.cc#newcode159 cc/base/math_util.cc:159: static const float epsilon_scale = 0.00001f; On 2017/01/11 18:23:57, ...
3 years, 11 months ago (2017-01-11 22:23:32 UTC) #11
flackr
lgtm https://codereview.chromium.org/2551263002/diff/160001/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/2551263002/diff/160001/cc/base/math_util.cc#newcode162 cc/base/math_util.cc:162: // for the base of the scale too. ...
3 years, 11 months ago (2017-01-11 22:48:28 UTC) #12
danakj
https://codereview.chromium.org/2551263002/diff/160001/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/2551263002/diff/160001/cc/base/math_util.cc#newcode158 cc/base/math_util.cc:158: static inline bool isNearlyTheSame(const float f, const float g) ...
3 years, 11 months ago (2017-01-11 23:12:06 UTC) #13
Peter Mayo
https://codereview.chromium.org/2551263002/diff/160001/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/2551263002/diff/160001/cc/base/math_util.cc#newcode158 cc/base/math_util.cc:158: static inline bool isNearlyTheSame(const float f, const float g) ...
3 years, 11 months ago (2017-01-11 23:47:04 UTC) #14
danakj
https://codereview.chromium.org/2551263002/diff/160001/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/2551263002/diff/160001/cc/base/math_util.cc#newcode158 cc/base/math_util.cc:158: static inline bool isNearlyTheSame(const float f, const float g) ...
3 years, 11 months ago (2017-01-11 23:51:54 UTC) #15
danakj
https://codereview.chromium.org/2551263002/diff/160001/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/2551263002/diff/160001/cc/base/math_util.cc#newcode986 cc/base/math_util.cc:986: bool IsNearlyTheSameForUnitTesting(const float left, const float right) { On ...
3 years, 11 months ago (2017-01-11 23:53:36 UTC) #16
Peter Mayo
On 2017/01/11 23:53:36, danakj (slow) wrote: > https://codereview.chromium.org/2551263002/diff/160001/cc/base/math_util.cc > File cc/base/math_util.cc (right): > > https://codereview.chromium.org/2551263002/diff/160001/cc/base/math_util.cc#newcode986 ...
3 years, 11 months ago (2017-01-11 23:56:22 UTC) #17
Peter Mayo
On 2017/01/11 23:51:54, danakj (slow) wrote: > https://codereview.chromium.org/2551263002/diff/160001/cc/base/math_util.cc > File cc/base/math_util.cc (right): > > https://codereview.chromium.org/2551263002/diff/160001/cc/base/math_util.cc#newcode158 ...
3 years, 11 months ago (2017-01-11 23:59:24 UTC) #18
danakj
On Wed, Jan 11, 2017 at 6:56 PM, <petermayo@chromium.org> wrote: > On 2017/01/11 23:53:36, danakj ...
3 years, 11 months ago (2017-01-11 23:59:56 UTC) #19
danakj
On Wed, Jan 11, 2017 at 6:59 PM, <petermayo@chromium.org> wrote: > On 2017/01/11 23:51:54, danakj ...
3 years, 11 months ago (2017-01-12 00:01:08 UTC) #20
Peter Mayo
https://codereview.chromium.org/2551263002/diff/220001/cc/base/math_util.h File cc/base/math_util.h (right): https://codereview.chromium.org/2551263002/diff/220001/cc/base/math_util.h#newcode338 cc/base/math_util.h:338: bool IsNearlyTheSameForTesting(const float left, const float right); These need ...
3 years, 11 months ago (2017-01-12 00:05:13 UTC) #21
danakj
LGTM with the const floats being just floats https://codereview.chromium.org/2551263002/diff/220001/cc/base/math_util.h File cc/base/math_util.h (right): https://codereview.chromium.org/2551263002/diff/220001/cc/base/math_util.h#newcode338 cc/base/math_util.h:338: bool ...
3 years, 11 months ago (2017-01-12 00:10:19 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2551263002/240001
3 years, 11 months ago (2017-01-12 01:13:13 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2551263002/260001
3 years, 11 months ago (2017-01-12 01:20:43 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_ng/builds/220696)
3 years, 11 months ago (2017-01-12 01:44:22 UTC) #31
Peter Mayo
On 2017/01/12 01:44:22, commit-bot: I haz the power wrote: > Try jobs failed on following ...
3 years, 11 months ago (2017-01-12 04:10:08 UTC) #32
danakj
Oh I didn't notice they are not in the class, they should be, so this ...
3 years, 11 months ago (2017-01-12 16:54:42 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2551263002/280001
3 years, 11 months ago (2017-01-12 17:25:09 UTC) #36
commit-bot: I haz the power
3 years, 11 months ago (2017-01-12 18:27:27 UTC) #39
Message was sent while issue was closed.
Committed patchset #14 (id:280001) as
https://chromium.googlesource.com/chromium/src/+/9dfe043a1722d857b7e92e4d646d...

Powered by Google App Engine
This is Rietveld 408576698