-
Notifications
You must be signed in to change notification settings - Fork 299
Restructure parts of batch.rs, port line shader to brush. #2259
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
This patch has no functional changes - it is necessary preparation work for some upcoming changes (handling text/box shadow pictures as part of the normal batching process). It's also a small improvement on the existing code structure itself.
r? @kvark I've split this re-structuring patch (which doesn't need super careful review, it's just shuffling code around) from the work I am doing on top of it, to hopefully make the review process a bit simpler. If I get the follow up work finished today, I'll add them as separate commits on top of this :) |
There's enough changes in the follow up commits that I should do a gecko try run now, before we merge this. Will kick one off shortly. |
In the future, we intend to collapse line decorations to be a simple rectangle + clip mask. This is an interim step towards that.
The follow up commits now include the work to port the line decoration shader to be a brush type. Try run looks good so far: The first commit has the majority of the line diffs, and has no functional changes. Only the last 3 commits need proper review. If it's easier to review as separate PRs, let me know and I can split them up easily. |
Reviewed 1 of 3 files at r2, 4 of 4 files at r3. webrender/src/batch.rs, line 516 at r3 (raw file):
the exclusion of webrender/src/batch.rs, line 773 at r3 (raw file):
is this another functional change? I'd expect this transform be controlled by the Comments from Reviewable |
Review status: 2 of 16 files reviewed at latest revision, 2 unresolved discussions. webrender/src/batch.rs, line 516 at r3 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Since there was previously a separate code path for non-Image pictures, they didn't execute any culling step at all. So adding this condition here makes that the same as previous (even though it's a bit inelegant for now). webrender/src/batch.rs, line 773 at r3 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
It probably makes sense for it to be controlled by that in the future (once the content origin is actually configurable), but it should match the existing behaviour. In the previous code, the alternative code path selection was based on the type of the picture, so I've matched that here. Comments from Reviewable |
Review status: 2 of 16 files reviewed at latest revision, 1 unresolved discussion. webrender/src/batch.rs, line 773 at r3 (raw file): Previously, glennw (Glenn Watson) wrote…
Understood. Perhaps, adding a comment here would help our future efforts ;) Comments from Reviewable |
Reviewed 14 of 14 files at r4. webrender/res/prim_shared.glsl, line 246 at r4 (raw file):
I think it would be more scalable to have Comments from Reviewable |
Reviewed 1 of 1 files at r5. webrender/src/renderer.rs, line 1615 at r3 (raw file):
nice :) one up, two down Comments from Reviewable |
c4375d0
to
fe496c1
Compare
Review status: 15 of 16 files reviewed at latest revision, 3 unresolved discussions. webrender/res/prim_shared.glsl, line 246 at r4 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
The render task data is a float texture - so do you mean transmute a u32 in that data to an f32, and then use a shader instruction to reinterpret cast from f32 -> u32, or is there an easier way you can think of to do this? webrender/src/batch.rs, line 773 at r3 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Done. Comments from Reviewable |
@kvark Thanks for the review! Added a comment to the code, and a question on what you meant by the uint flags. |
Review status: 15 of 16 files reviewed at latest revision, 2 unresolved discussions. webrender/res/prim_shared.glsl, line 246 at r4 (raw file): Previously, glennw (Glenn Watson) wrote…
Even if you just static-cast int to float and back (without re-interpretation), there are 23 mantissa bits available - should be enough for now :) i.e. Rust side does: Comments from Reviewable |
@glennw please feel free to merge with r=me if you don't feel like playing with flags - it's a minor concern. |
fe496c1
to
6035650
Compare
@kvark Thanks - I have left the flags as is for now to avoid a new try run, but I added a @bors-servo r=kvark |
📌 Commit 6035650 has been approved by |
Restructure parts of batch.rs, port line shader to brush. This patch has no functional changes - it is necessary preparation work for some upcoming changes (handling text/box shadow pictures as part of the normal batching process). It's also a small improvement on the existing code structure itself. <!-- 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/2259) <!-- Reviewable:end -->
☀️ Test successful - status-appveyor, status-travis |
This patch has no functional changes - it is necessary preparation
work for some upcoming changes (handling text/box shadow pictures
as part of the normal batching process). It's also a small improvement
on the existing code structure itself.
This change is