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 upSwitch AlphaBatchKeyFlags to use bitflags! crate. #539
Conversation
|
looks pretty good! :) |
| pub flags AlphaBatchKeyFlags: u8 { | ||
| const AXIS_ALIGNED = 0b00000010, | ||
| const COMPLEX = 0b00000100, | ||
| const NEEDS_CLIPPLING = 0b00000001, |
This comment has been minimized.
This comment has been minimized.
|
|
||
| impl AlphaBatchKeyFlags { | ||
| fn new(transform_kind: TransformedRectKind, | ||
| needs_clipping: bool) -> AlphaBatchKeyFlags { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
emilio
Nov 8, 2016
Member
Though now seems easier to just use the literals and or them as you've done below, so we might as well get rid of this function entirely.
| pub flags AlphaBatchKeyFlags: u8 { | ||
| const AXIS_ALIGNED = 0b00000010, | ||
| const COMPLEX = 0b00000100, | ||
| const NEEDS_CLIPPLING = 0b00000001, |
This comment has been minimized.
This comment has been minimized.
|
Thanks! Github says there are conflicts in this file, so it will need to be rebased. After rebasing and fixing the one remaining comment, we'll get this merged. |
| pub flags AlphaBatchKeyFlags: u8 { | ||
| const NEEDS_CLIPPING = 0b00000001, | ||
| const AXIS_ALIGNED = 0b00000010, | ||
| const COMPLEX = 0b00000100, |
This comment has been minimized.
This comment has been minimized.
glennw
Nov 8, 2016
Member
I think we can remove the COMPLEX flag altogether, since it's mutually exclusive with AXIS_ALIGNED and isn't actually used.
This comment has been minimized.
This comment has been minimized.
moriturus
Nov 8, 2016
Author
Contributor
https://github.com/moriturus/webrender/blob/6ae1e2a4e4d6c111d177b32d4f54b2273d95f63d/webrender/src/tiling.rs#L440-L443
TheCOMPLEX flag is used at above lines. Will TransformedRectKind::Complex never be used?
This comment has been minimized.
This comment has been minimized.
glennw
Nov 8, 2016
Member
The COMPLEX flag is set there, but it's never actually tested against - the fn transform_kind() function just checks the valule of AXIS_ALIGNED (since the presence of one implies the absence of the other). Something seems to have gotten confused with the merge / rebase too - it looks like there is part of another commit in this PR now?
add stride data as an optional field to upload textures Thanks for the idea of using option! That worked quite well :) <!-- 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/538) <!-- Reviewable:end -->
# Conflicts: # webrender/src/tiling.rs
|
Oops, I accidentally remove this PR's branch. I will re-open my PR. |
Switch AlphaBatchKeyFlags to use bitflags! crate. Sorry about my mistake on #539 then I re-open this PR. <!-- 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/541) <!-- Reviewable:end -->
moriturus commentedNov 8, 2016
•
edited by larsbergstrom
#509
This change is