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 up[meta] Embedding notes 2020 #27579
Open
[meta] Embedding notes 2020 #27579
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dumping some personal notes on, what I think, are the most-required structural changes for the servo embedding/composition story.
Looping:
do not run embedding code in the same thread as the compositor code #19679. Otherwise the embedder needs to implement the looping mechanism itself, which is rather annoying to build (I had to implement this loop for Android, UWP, winit, and Mac, it's getting old). Better do it once for all in Servo. Probably a lot easier now we rely on Surfman.
do not block on swapbuffer. Relying on the swapbuffer to block long enough to run at 60FPS makes orchestrating the requestAnimationFrame and layout changes very difficult (see all the 1000FPS / too many embedder calls bugs we had to deal with) . We need a dedicated thread that ticks on vblank that drives layout and rAF (like Gecko), and also we should remove the spurious animation frame check.
Support for more than one view:
This will be necessary for a proper tab support (kind of supported already by ugly) and multi-window support.
More on this there: #23179
Embedder:
Cosmetic changes: