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 upstruct Scene doesn't support removing pipelines #691
Comments
|
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. |
|
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). |
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 -->
The HashMaps in here will just accumulate pipeline forever.