Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure potentially expensive operations don't break APZ #1478

Closed
nical opened this issue Jul 13, 2017 · 4 comments
Closed

Ensure potentially expensive operations don't break APZ #1478

nical opened this issue Jul 13, 2017 · 4 comments

Comments

@nical
Copy link
Collaborator

@nical nical commented Jul 13, 2017

Followup from #1370 to discuss architecture changes we want to make in order to move expensive operations out of the critical path.

@nical nical changed the title Ensure potentially expensive operations don Ensure potentially expensive operations don't break APZ Jul 13, 2017
@glennw
Copy link
Member

@glennw glennw commented Jul 19, 2017

Crazy idea / question:

Could we ship the clip-scroll tree along with each frame we send to the compositor thread? I'm not sure if it's feasible or how costly it would be.

But if it were feasible, then the APZ could actually be done on the compositor thread - just by updating transforms in the clip-scroll tree, and then patching the list of matrices that get uploaded for a frame.

In such a scenario, the render backend would no longer have any involvement in APZ - the render backend could happily be producing a new frame, while the compositor can tweak the clip-scroll tree and list of transforms. This is hand-wavy, but I'd assume we could also extract information from the clip-scroll tree that would allow the compositor to know where to draw checkerboard regions.

Potentially, this could also have an effect on how hit-testing works (if we do it in WR, allowing it to be done on the compositor thread), although that's even more speculative than the above.

If that worked, it seems like it might simplify the APZ implementation a lot.

Does that make any sense @mrobinson @kvark @nical @staktrace @jrmuizel ?

@staktrace
Copy link
Contributor

@staktrace staktrace commented Jul 20, 2017

I don't have a good mental model of some of this, so please correct me if what I say makes no sense...

Are you thinking of duplicating the clip-scroll tree, or just sharing it across the two threads? If we end up with two copies, and we only update the one on the compositor thread with APZ, then we would have to use that updated one for hit-testing (assuming we do it in WR at all). Updating both copies doesn't make sense since we'd have to block on the render backend thread to do the update which negates the benefit of this approach.

@staktrace
Copy link
Contributor

@staktrace staktrace commented Aug 14, 2017

I filed #1575 for exposing a hit-test API.

@gw3583
Copy link
Collaborator

@gw3583 gw3583 commented Feb 1, 2019

I think this is all in place now.

@gw3583 gw3583 closed this Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.