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 upTrim the render work done after a scene build #2936
Conversation
webrender/src/frame_builder.rs, line 307 at r1 (raw file):
Perhaps pass a ClipRenderContext here, rather than the gpu_cache.unwrap() etc below? |
|
Apart from the review comment above, I have a couple of questions:
If we can get away with just updating the clip scroll tree, that's great - it should be a decent win. However, if we need to also call |
|
|
There are none - we want to rebuild the hit tester if we get a new scene or do an async scroll, and in both of those cases we want to do a render anyway. The issue is one of timing. The render that we do upon getting a new scene happens at the next vsync, triggered from one of these two callbacks. However in between the scene build happening and that next vsync, we would have an inconsistent hit-test state unless we rebuild the hit tester. So currently, we are doing two renders for each scene build - one is at the next vsync as linked above, and the other is triggered from here. That's the one that I'm trying to trim.
But do we actually use the local rect of a primitive when doing a hit-test? I was looking at the code in hit_test.rs and I didn't see anywhere we use that, it looks like a totally separate data structure. Maybe I missed something?
Likewise, from my reading of the hit-testing code, the backface visibility check uses the flag on the
I'm not sure if there is actually a spec that covers hit-testing, but I believe that with respect to backface-visibility, the item is hit-testable if and only if it is visible. |
This groups together rendering-related arguments passed to the clip tree update codepath.
This allows us to update the clip scroll tree but outside the context of a render. It just skips the steps that are specific to rendering.
|
I updated the patches to address the review comment. And it looks like Martin isn't working on WR now so we'll have to figure this out without him :( |
|
|
|
I rebased this PR in this branch. I'll do some testing before submitting the pull request. try-push with talos: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2f0a0093d96456c101aeced4d78f5f6077869a1d |
|
Replaced by #3052 |
staktrace commentedJul 28, 2018
•
edited by larsbergstrom
Fixes #2807. I'm not totally sure that I'm including all the work that is necessary for hit-testing but it seems to pass my ad-hoc testing and CI. But still, please review with care to make sure I'm not violating assumptions or leaving behind inconsistent state by just doing the bits of the clip scroll tree update that don't touch the resource cache, gpu cache, and transform palette.
This change is