-
Notifications
You must be signed in to change notification settings - Fork 301
Decompose tiled images during frame building (v3). #2695
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
Conversation
|
Fixes #2689. |
|
Reviewed 14 of 14 files at r1. webrender/src/batch.rs, line 617 at r1 (raw file):
I think we'd be better to match on the prim kind here. Having a fallible call here may mask bugs for other primitive types, if the cache address is not valid when it's expected to be. webrender/src/device.rs, line 1253 at r1 (raw file):
I don't understand this change. This would mean that we can never do a blit which is a stretch? webrender/src/gpu_cache.rs, line 660 at r1 (raw file):
We can remove this, given the comment above about this method call. webrender/src/prim_store.rs, line 1360 at r1 (raw file):
The GPU cache format for an image brush has changed recently - in between the prim rect and the segment info are two colors - they can just be set to PremultipliedColorF::WHITE in this case. We should abstract the code to write a brush image GPU request into a function (doesn't need to be done this PR though). webrender/src/prim_store.rs, line 2162 at r1 (raw file):
nit: conservative spelling webrender/src/prim_store.rs, line 2183 at r1 (raw file):
This comment doesn't seem relevant here? wrench/reftests/transforms/local-clip.png, line 0 at r1 (raw file): Comments from Reviewable |
|
@nical Amazing PR, thanks! This looks great to me - it will be fantastic to finally remove the legacy image primitive. There are a few comments from reviewable above, but they are all minor details. The sooner we can get this merged the better, since it will bitrot easily. Things left to complete below:
|
|
Review status: all files reviewed at latest revision, 7 unresolved discussions, some commit checks failed. webrender/src/prim_store.rs, line 2183 at r1 (raw file): Previously, glennw (Glenn Watson) wrote…
Oops, copy-pasta accident. wrench/reftests/transforms/local-clip.png, line at r1 (raw file): Previously, glennw (Glenn Watson) wrote…
This shouldn't be part of the final PR. I updated this reference image after changing the way the antialiasing is clipped in the image brush shader but this was in the PR about support repetitions in brush shaders and ended up in this commit queue by accident (this branch has been rebased many times). This PR will be quite a bit smaller once I have merged the two PRs that it sits on top of (#2644 and #2664). Comments from Reviewable |
|
webrender/src/prim_store.rs, line 1360 at r1 (raw file): Previously, glennw (Glenn Watson) wrote…
I don't see where these colors are being added currently. Has this changed landed? Comments from Reviewable |
|
webrender/src/prim_store.rs, line 1360 at r1 (raw file): Previously, nical (Nicolas Silva) wrote…
Err nevermind, I hadn't properly rebased. Comments from Reviewable |
This PR implements decomposing tiled images during frame building using visibility information to avoid issues with very large blob images.
This version does not use segments, avoiding issues with the maximum contiguous gpu cache alloc size as well as a few hacks that I had to write to get repetitions to work with segments.
As a bonus the non-brush image primitive and ps_image shader are now obsolete so I removed them.
This change is