Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upForce all calls to project_rect to include a bounding rect. #2999
Conversation
This greatly improves the accuracy of the clipper code when required to calculate the world rect for a primitive that crosses the near plane. This patch by itself doesn't fix anything specific, but when combined with the fixes that are in progress in the plane-split crate, it will allow correct world rect calculations for primitives that cross the near plane in various edge cases.
|
r? @kvark Mea culpa Pending try run: I expect the try run to have some orange items due to the previous PRs that have recently landed, so I'll comment on the results once the try completes. |
|
Try looks good: It matches the current baseline https://treeherder.mozilla.org/#/jobs?repo=try&revision=d25ddc2775a1146d2dad8b63fa8d011f49a6222e&selectedJob=196793766 against WR master, except for one new PASS in R1 [1157984-1.html]. |
|
|
||
| let map_local_to_pic = SpaceMapper::new( | ||
| ref_spatial_node_index, | ||
| pic_bounds, |
This comment has been minimized.
This comment has been minimized.
| @@ -161,6 +166,21 @@ impl<F, T> SpaceMapper<F, T> where F: fmt::Debug { | |||
| } | |||
| } | |||
|
|
|||
| pub fn unmap(&self, rect: &TypedRect<f32, T>) -> Option<TypedRect<f32, F>> { | |||
This comment has been minimized.
This comment has been minimized.
kvark
Aug 31, 2018
Member
I think this should be renamed. It sounds like the mapping was reversible in the first place and we just undo it, but in reality inverse_rect_footprint is clearly irreversible.
|
This resolves my concern from #2995 review. Thank you! |
|
|
Force all calls to project_rect to include a bounding rect. This greatly improves the accuracy of the clipper code when required to calculate the world rect for a primitive that crosses the near plane. This patch by itself doesn't fix anything specific, but when combined with the fixes that are in progress in the plane-split crate, it will allow correct world rect calculations for primitives that cross the near plane in various edge cases. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2999) <!-- Reviewable:end -->
|
|
gw3583 commentedAug 31, 2018
•
edited by larsbergstrom
This greatly improves the accuracy of the clipper code when
required to calculate the world rect for a primitive that
crosses the near plane.
This patch by itself doesn't fix anything specific, but when
combined with the fixes that are in progress in the
plane-split crate, it will allow correct world rect calculations
for primitives that cross the near plane in various edge cases.
This change is