-
Couldn't load subscription status.
- Fork 301
Decompose tiled images during frame building (v4) #2742
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
258ebcf to
c2ec519
Compare
|
Reviewed 11 of 11 files at r3. webrender/src/batch.rs, line 613 at r3 (raw file):
is this a new concept introduced by the PR? We already have segments, so this is a bit confusing webrender/src/batch.rs, line 995 at r3 (raw file):
does it make sense to take the webrender/src/batch.rs, line 1365 at r3 (raw file):
I'd really like to nuke that webrender/src/image.rs, line 183 at r3 (raw file):
nit: I don't think we need those, the webrender/src/prim_store.rs, line 2480 at r3 (raw file):
as mentioned in #2704 (comment) we shouldn't have this method webrender/src/renderer.rs, line 139 at r3 (raw file):
🎉 Comments from Reviewable |
|
Review status: all files reviewed at latest revision, 6 unresolved discussions. webrender/src/prim_store.rs, line 2480 at r3 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
This seems insufficient. In my rawtest test case prim_run_context.clip_chain_rect is None and so we end up not clipping at all instead of clipping to the screen bounds. Comments from Reviewable |
c2ec519 to
4711191
Compare
|
This has one of the review comments applied. The others seemed less actionable, or things we can do in a follow up once nical is back. |
Yep, version 2 of this tile decomposition saga was an attempt to use segments and it went wrong in various ways:
That said, with some extra work we could actually segment individual tiles just like we do for regular primitives to move more pixels to the opaque pass when there is aa or clipping involved.
This arm is specific to the tiled case. we could rewrite it to handle both tiled and non-tiled images but the non-tiled image path is shares more with the rest of the primitives than it shares with the tiled image path so it wouldn't buy us much. |
|
☔ The latest upstream changes (presumably #2747) made this pull request unmergeable. Please resolve the merge conflicts. |
e30ba77 to
7b557af
Compare
webrender/src/image.rs
Outdated
| use euclid::{TypedRect, TypedSize2D, TypedPoint2D}; | ||
|
|
||
| fn point<T: Copy, U>(x: T, y: T) -> TypedPoint2D<T, U> { | ||
| TypedPoint2D::new(x, y) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's just use existing euclid's point2, size2, and possibly rect helpers
| device_tile_size, | ||
| &mut |tile_rect, tile_offset, tile_flags| { | ||
| // make sure we don't get sent duplicate tiles | ||
| assert!(!tiles.contains(&tile_offset)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can assert that prim_rect.contains(&tile_rect) as well as
!tiles.any(|t| t.intersects(&tile_rect)) which is superior to !tiles.contains(&tile_offset)
| #[test] | ||
| fn basic() { | ||
| let mut count = 0; | ||
| checked_for_each_tile(&rect(0., 0., 1000., 1000.), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can just make it to count things right away instead of accepting a generic closure
| ); | ||
| assert_eq!(count, 0); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline!
7b557af to
9d5a0e3
Compare
|
🚢 it |
|
📌 Commit 9d5a0e3 has been approved by |
Decompose tiled images during frame building (v4) This is a continuation of #2704 <!-- 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/2742) <!-- Reviewable:end -->
|
☀️ Test successful - status-appveyor, status-taskcluster |
This is a continuation of #2704
This change is