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

struct Scene doesn't support removing pipelines #691

Closed
jrmuizel opened this issue Jan 6, 2017 · 2 comments
Closed

struct Scene doesn't support removing pipelines #691

jrmuizel opened this issue Jan 6, 2017 · 2 comments

Comments

@jrmuizel
Copy link
Contributor

@jrmuizel jrmuizel commented Jan 6, 2017

The HashMaps in here will just accumulate pipeline forever.

@akiselev
Copy link

@akiselev akiselev commented Jan 16, 2017

Should this be fixed with a simple remove_pipeline() method on Scene or are there plans to support automated culling? What happens if a pipeline is in the heirarchy of the root stacking context when it is removed from the HashMap? How is GPU memory for a pipeline deallocated and does Scene even care or does it have to be done separately? (Haven't had time yet to dive into those details)

I'm working to implement the needed functionality for my own project but I'm using webrender outside of Servo so I don't know how high level the API should be for a PR. I'm guessing Servo will have its own implementation for tracking pipelines and freeing them but it might make sense to add some basic culling function to Scene that removes any pipeline not referenced in the root stacking context heirarchy or a function to remove all pipelines starting from a root pipeline.

@jrmuizel
Copy link
Contributor Author

@jrmuizel jrmuizel commented Jan 16, 2017

I think a simple remove_pipeline() is the best place to start. Once we have that we iterate on any improvements.

For now, we can probably just panic if the pipeline is missing (I think that's what happens today).

staktrace added a commit to staktrace/webrender that referenced this issue Aug 29, 2017
staktrace added a commit to staktrace/webrender that referenced this issue Aug 29, 2017
bors-servo added a commit that referenced this issue Aug 30, 2017
Add an API to remove pipelines.

Fixes #691

I'm not at all sure this code is doing the right thing (it's largely copy-paste), so please don't hesitate to point out all the things that are wrong with this code. In particular I don't know (a) if this will leave things in an inconsistent state and (b) how to exercise the wrench changes.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1629)
<!-- Reviewable:end -->
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
3 participants
You can’t perform that action at this time.