|
|
Chromium Code Reviews|
Created:
3 years, 10 months ago by Tobias Sargeant Modified:
3 years, 9 months ago Reviewers:
enne (OOO) CC:
cc-bugs_chromium.org, chromium-reviews, vmiura Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionCorrect polygon splitting in an almost-coplanar case.
In the case described in the associated bug, the signs of the vertices
of the quad to be split are [ 0 0 + - ], which means that floating
point rounding has resulted in a polygon that is not flat. Originally
one of the two points that lies on the splitting plane was not being
included in either output polygon, which caused the result to be
incorrect.
This corrects the case when two consecutive points are on the splitting
plane.
BUG=693826
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
Review-Url: https://codereview.chromium.org/2714243002
Cr-Commit-Position: refs/heads/master@{#453888}
Committed: https://chromium.googlesource.com/chromium/src/+/02a3371e8aa5f5ec354509e3625371cbf6f81707
Patch Set 1 #Patch Set 2 : Add a unittest. #
Total comments: 1
Patch Set 3 : Existing unittest: "Splitting a pentagon gives two triangles"... hmm... #Patch Set 4 : remove stray whitespace addition. #Patch Set 5 : Add additional check to DoubleSplit unittest #Patch Set 6 : Make constants float, for Windows. #Messages
Total messages: 38 (24 generated)
Description was changed from ========== Correct polygon splitting in an almost-coplanar case. In the case described in the associated bug, the signs of the vertices of the quad to be split are [ 0 0 + - ], which means that floating point rounding has resulted in a polygon that is not flat. Originally one of the two points that lies on the splitting plane was not being included in either output polygon, which caused the result to be incorrect. This corrects the case when two consecutive points are on the splitting plane. BUG=693826 ========== to ========== Correct polygon splitting in an almost-coplanar case. In the case described in the associated bug, the signs of the vertices of the quad to be split are [ 0 0 + - ], which means that floating point rounding has resulted in a polygon that is not flat. Originally one of the two points that lies on the splitting plane was not being included in either output polygon, which caused the result to be incorrect. This corrects the case when two consecutive points are on the splitting plane. BUG=693826 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ==========
tobiasjs@chromium.org changed reviewers: + enne@chromium.org
PTAL. In the linked bug I found a small repro for this case. Should it be added as a pixel test?
On 2017/02/24 at 21:04:07, tobiasjs wrote: > PTAL. In the linked bug I found a small repro for this case. Should it be added as a pixel test? Could it be a unit test?
On 2017/02/24 21:12:50, enne wrote: > On 2017/02/24 at 21:04:07, tobiasjs wrote: > > PTAL. In the linked bug I found a small repro for this case. Should it be > added as a pixel test? > > Could it be a unit test? Yes. I've added one.
lgtm https://codereview.chromium.org/2714243002/diff/20001/cc/quads/draw_polygon_u... File cc/quads/draw_polygon_unittest.cc (right): https://codereview.chromium.org/2714243002/diff/20001/cc/quads/draw_polygon_u... cc/quads/draw_polygon_unittest.cc:494: // polygon to become twisted. Splitting should still give a valid I wish more unit tests explained themselves this well. :)
The CQ bit was checked by tobiasjs@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by tobiasjs@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2017/02/28 13:02:15, commit-bot: I haz the power wrote: > Try jobs failed on following builders: > linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, > http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) Two problems caused failures. * I didn't change the normal when I cut and pasted the new data from an existing test. * An existing test started failing. It was asserting that cutting a pentagon produced two triangles, so I'm pretty sure that it was actually testing the presence of a bug in the original splitting code. I've updated it to match the output post my change, but I thought I should flag it. I added the "all input vertices should appear in output polygons" assertion to the DoubleSplit test, and it did indeed fail prior to this change.
lgtm 2 Thanks for the explanation. :)
The CQ bit was checked by tobiasjs@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
Patchset #5 (id:80001) has been deleted
The CQ bit was checked by tobiasjs@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from enne@chromium.org Link to the patchset: https://codereview.chromium.org/2714243002/#ps100001 (title: "Add additional check to DoubleSplit unittest")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
The CQ bit was checked by tobiasjs@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm6...)
The CQ bit was checked by tobiasjs@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by tobiasjs@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from enne@chromium.org Link to the patchset: https://codereview.chromium.org/2714243002/#ps120001 (title: "Make constants float, for Windows.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 120001, "attempt_start_ts": 1488358555433570,
"parent_rev": "da0deb9b9f7e997f597b2d7c8dd1f3c38f4ebbea", "commit_rev":
"02a3371e8aa5f5ec354509e3625371cbf6f81707"}
Message was sent while issue was closed.
Description was changed from ========== Correct polygon splitting in an almost-coplanar case. In the case described in the associated bug, the signs of the vertices of the quad to be split are [ 0 0 + - ], which means that floating point rounding has resulted in a polygon that is not flat. Originally one of the two points that lies on the splitting plane was not being included in either output polygon, which caused the result to be incorrect. This corrects the case when two consecutive points are on the splitting plane. BUG=693826 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ========== to ========== Correct polygon splitting in an almost-coplanar case. In the case described in the associated bug, the signs of the vertices of the quad to be split are [ 0 0 + - ], which means that floating point rounding has resulted in a polygon that is not flat. Originally one of the two points that lies on the splitting plane was not being included in either output polygon, which caused the result to be incorrect. This corrects the case when two consecutive points are on the splitting plane. BUG=693826 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2714243002 Cr-Commit-Position: refs/heads/master@{#453888} Committed: https://chromium.googlesource.com/chromium/src/+/02a3371e8aa5f5ec354509e36253... ==========
Message was sent while issue was closed.
Committed patchset #6 (id:120001) as https://chromium.googlesource.com/chromium/src/+/02a3371e8aa5f5ec354509e36253... |
