Skip to content

Remove Rc usage from the crate - #188

Open
nox wants to merge 1 commit into
mainfrom
kill-rc
Open

Remove Rc usage from the crate#188
nox wants to merge 1 commit into
mainfrom
kill-rc

Conversation

@nox

@nox nox commented Mar 8, 2019

Copy link
Copy Markdown
Contributor

Callers should use Rc wherever they want, so that adapters such as ErrorCheckingGl can do their job without multiple layers of virtual calls.


This change is Reviewable

Callers should use Rc<T> wherever they want, so that adapters such as ErrorCheckingGl can do their job without multiple layers of virtual calls.
@nox

nox commented Mar 8, 2019

Copy link
Copy Markdown
Contributor Author

Cc @asajeffrey @bholley

@bholley

bholley commented Mar 9, 2019

Copy link
Copy Markdown
Contributor

Looking at this patch, I'm not sure it's compatible with WebRender. That code needs to start using a trait object early on (to abstract over the difference between GL and GLES), and by the time we decide to apply the wrappers (e.g. ErrorReactingGl) we don't have the concrete type anymore.

ProfilingGl has a similar problem [1], which is sort of exacerbated by the fact that it can have four different inners (GL/GLES, with/without ErrorReactingGl wrapper).

[1] https://hg.mozilla.org/integration/mozilla-inbound/rev/1972b8836948

@kvark

kvark commented Mar 9, 2019

Copy link
Copy Markdown
Member

@bholley interesting point! Can't we solve this by simply:

impl<T: Gl> Gl for Rc<T> {...}

@nox

nox commented Mar 9, 2019

Copy link
Copy Markdown
Contributor Author

Yes.

@kvark

kvark commented Jul 10, 2019

Copy link
Copy Markdown
Member

@nox so we are basically ready to land this, just waiting for a moment to do the breaking change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants