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 upborder: Don't always share instances across borders if the instances depend on the available border size. #3067
Conversation
| @@ -528,10 +528,63 @@ pub struct BorderSegmentInfo { | |||
| widths: DeviceSize, | |||
| } | |||
|
|
|||
| bitflags! { | |||
| /// Whether we depend in the available size for the border (effectively in | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| } | ||
|
|
||
| let device_size = (*local_size * scale).to_i32(); | ||
| if self.available_size_dependence.intersects(AvailableSizeDependence::VERTICAL) { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| ) -> DeviceIntSize { | ||
| let mut size = DeviceIntSize::zero(); | ||
| if self.available_size_dependence.is_empty() { | ||
| return size; |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
emilio
Sep 17, 2018
Author
Member
Because for borders where we don't depend on any size we just want the same value for all of them, so they hit the cache and we don't build instances unnecessarily.
This comment has been minimized.
This comment has been minimized.
kvark
Sep 17, 2018
Member
what about a particular width/height then? shouldn't we put 0.0 into width if the key is only height-sensitive?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
emilio
Sep 17, 2018
•
Author
Member
Note that we return size instead of device_size. I'm open to suggestions about how to make that clearer.
…depend on the available border size. I've added a big comment to BorderRenderTaskInfo with my current understanding of the invariants this code is trying to preserve. Please sanity-check it, but I think this patch should both be sound and also prevent the scrolling-franzine issue (https://bugzilla.mozilla.org/show_bug.cgi?id=1489644). Fixes #3058
|
Comments addressed. |
|
Reftests and such look all green so far, yay :) |
|
Thank you, I'm convinced now :) |
|
@bors-servo r=kvark @gw3583 feel free to take a quick skim at the changes just to sanity-check, if you want :) |
|
|
border: Don't always share instances across borders if the instances depend on the available border size. I've added a big comment to BorderRenderTaskInfo with my current understanding of the invariants this code is trying to preserve. Please sanity-check it, but I think this patch should both be sound and also prevent the scrolling-franzine issue (https://bugzilla.mozilla.org/show_bug.cgi?id=1489644). Fixes #3058 <!-- 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/3067) <!-- Reviewable:end -->
|
|
emilio commentedSep 17, 2018
•
edited by larsbergstrom
I've added a big comment to BorderRenderTaskInfo with my current understanding
of the invariants this code is trying to preserve.
Please sanity-check it, but I think this patch should both be sound and also
prevent the scrolling-franzine issue
(https://bugzilla.mozilla.org/show_bug.cgi?id=1489644).
Fixes #3058
This change is