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
Cache the current batch for both opaque and alpha batch lists. #3197
Conversation
In the (near) future, we will want to support adding segments where the texture may be different between segments (it is currently assumed to be the same for all segments in a single primitive). To do this efficiently, we need to be able to add segments while switching batch only when necessary, so we now cache the current batch in the batch lists, and re-use it if the batch keys are compatible. This is also a general optimization for opaque batches - this patch allows the previously cached batch to be re-used for different opaque primitives. This can avoid searching the batch array when sequences of the same opaque primitive are added.
Pending try: This is about 7 steps removed from picture caching, but will make some necessary changes for that easier. Specifically, we'll be able to make borders use a separate render task per edge / segment, which will allow segment building to take place during scene building, which will allow local clipping to be calculated during scene building, which will be important for some of the picture caching code I'm working on. 😬 |
and switch brush_image to use it.
Added a follow up commit that adds the basic structure to using per-segment user data for the texture cache address in Kicked off a try run with that new commit: |
@bors-servo r+ |
📌 Commit e795a19 has been approved by |
Cache the current batch for both opaque and alpha batch lists. In the (near) future, we will want to support adding segments where the texture may be different between segments (it is currently assumed to be the same for all segments in a single primitive). To do this efficiently, we need to be able to add segments while switching batch only when necessary, so we now cache the current batch in the batch lists, and re-use it if the batch keys are compatible. This is also a general optimization for opaque batches - this patch allows the previously cached batch to be re-used for different opaque primitives. This can avoid searching the batch array when sequences of the same opaque primitive are added. <!-- 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/3197) <!-- Reviewable:end -->
☀️ Test successful - status-appveyor, status-taskcluster |
In the (near) future, we will want to support adding segments
where the texture may be different between segments (it is
currently assumed to be the same for all segments in a single
primitive). To do this efficiently, we need to be able to add
segments while switching batch only when necessary, so we now
cache the current batch in the batch lists, and re-use it if
the batch keys are compatible.
This is also a general optimization for opaque batches - this
patch allows the previously cached batch to be re-used for
different opaque primitives. This can avoid searching the
batch array when sequences of the same opaque primitive are
added.
This change is