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

Do not run embedding code in the same thread as the compositor code #19679

Open
paulrouget opened this issue Jan 3, 2018 · 1 comment
Open

Do not run embedding code in the same thread as the compositor code #19679

paulrouget opened this issue Jan 3, 2018 · 1 comment

Comments

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented Jan 3, 2018

GL operations need to run in the main thread on Desktop, and on a the GL thread on mobile.

If i'm not mistaken, as of today, the GL code runs in the thread used to start Servo. In other words, the embedding glue code runs in the compositor thread.

This means, for example on Android, that any communication with Servo (even non-compositor related operations, like navigating the history) need to happen in the GL thread.

We need to be able to start Servo from any thread, and have a mechanism to start the compositor in the proper thread.

@paulrouget
Copy link
Contributor Author

@paulrouget paulrouget commented Jan 8, 2018

The goal here would be to let the embedder starts the libservo::Servo in an any thread.

The libservo code will need to know in which thread to start compositor code. So the emebdder needs to provide a way to run code in the desired thread.

Maybe just providing a callback run_in_gl_thread might do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Android MVP
  
To do
Linked pull requests

Successfully merging a pull request may close this issue.

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