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

Multiple Renderers on the same thread? #2782

Closed
nc4rrillo opened this issue May 27, 2018 · 2 comments
Closed

Multiple Renderers on the same thread? #2782

nc4rrillo opened this issue May 27, 2018 · 2 comments

Comments

@nc4rrillo
Copy link
Contributor

@nc4rrillo nc4rrillo commented May 27, 2018

Context

I'm working on porting WebRender to be the underlying graphics renderer for a UI framework I contribute to.
I'm at the point where I need to add support for pop ups (Drop downs, Context Menus, etc). The framework implements these as separate top level Windows.

Problem

The popup windows share the same UI thread as the main window.
What I'm trying to do is spawn a Renderer for each Window, but I'm hitting an assert profiler.borrow().is_none in thread_profiler

This is because WR calls register_thread_with_profiler in Renderer::new(..) here

Is it possible to have this assertion relaxed and just bail out if the thread has already been registered?

@nical
Copy link
Collaborator

@nical nical commented May 28, 2018

Gecko uses the same thread for all of its renderers, so this should work for you as well. The assertion you pointed to doesn't seem to exist on WebRender's master branch, is there a reason you are referring to Glenn's fork instead of the main repository?

@nc4rrillo
Copy link
Contributor Author

@nc4rrillo nc4rrillo commented May 28, 2018

Updating WR to master took care of this for me. 🤷‍♂️

@nc4rrillo nc4rrillo closed this May 28, 2018
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
2 participants
You can’t perform that action at this time.