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 upTrack the validity of the frame and hit tester to avoid redundant work. #3043
Conversation
|
Also worth exploring as a followup: query the visibility of updated images so that we can skip frame building and rendering altogether if something animates off screen. |
| /// Track whether the last built frame is up to date or if it will need to be re-built | ||
| /// before rendering again. | ||
| frame_is_valid: bool, | ||
| hit_tester_is_valid: bool, |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
nical
Sep 11, 2018
Author
Collaborator
If we do this we need to first process all messages that use the hit tester before setting it to None. for example if you have a transaction that both updates and uses the hit tester, right now the rule is that hit testing operations use the previous hit tester and we update the hit tester at the end.
So it'll be a bit more fiddly but I think it's a good idea.
This comment has been minimized.
This comment has been minimized.
nical
Sep 11, 2018
Author
Collaborator
Alternatively, I'm leaning towards replacing the Option<HitTester> with a bare HitTester containing a valid boolean flag. This would let us recycle it's allocations instead of reallocating each time. Thoughts?
This comment has been minimized.
This comment has been minimized.
|
@bors-servo r=kvark |
|
|
Track the validity of the frame and hit tester to avoid redundant work. This lays the ground work for keeping track of the validity of the current frame and hit tester to allow only re-building them when something invalidates them. This initial commit only skips redundant frame builds (typically when a scene is built and the vsync triggered transactions that follows doesn't scroll or use async animations). But after we separate building the frame and the hit tester, we'll be able to improve upon this by lazily building the frame and avoid double frame builds during scrolling and animations as well. <!-- 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/3043) <!-- Reviewable:end -->
|
|
Speed up updating the hit-test tree The first two commits take advantage of what was put in place in #3043 to avoid building the frame when all we need is the hit tester. The next two commits pick some low hanging optimization fruits in the hit tester to paper over a few minor talos regressions from the first commits. <!-- 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/3052) <!-- Reviewable:end -->
nical commentedSep 11, 2018
•
edited by larsbergstrom
This lays the ground work for keeping track of the validity of the current frame and hit tester to allow only re-building them when something invalidates them.
This initial commit only skips redundant frame builds (typically when a scene is built and the vsync triggered transactions that follows doesn't scroll or use async animations). But after we separate building the frame and the hit tester, we'll be able to improve upon this by lazily building the frame and avoid double frame builds during scrolling and animations as well.
This change is