bevy/crates/bevy_render/src
James Liu 342f69e304 Shrink ComputedVisibility (#6305)
# Objective
`ComputedVisibility` could afford to be smaller/faster. Optimizing the size and performance of operations on the component will positively benefit almost all extraction systems.

This was listed as one of the potential pieces of future work for #5310.

## Solution
Merge both internal booleans into a single `u8` bitflag field. Rely on bitmasks to evaluate local, hierarchical, and general visibility.

Pros:

 - `ComputedVisibility::is_visible` should be a single bitmask test instead of two.
 - `ComputedVisibility` is now only 1 byte. Should be able to fit 100% more per cache line when using dense iteration.

Cons:

 - Harder to read.
 - Setting individual values inside `ComputedVisiblity` require bitmask mutations. 

This should be a non-breaking change. No public API was changed. The only publicly visible effect is that `ComputedVisibility` is now 1 byte instead of 2.
2022-11-14 23:34:52 +00:00
..
camera Add AutoMax next to ScalingMode::AutoMin (#6496) 2022-11-14 22:34:28 +00:00
color Correctly use as_hsla_f32 in Add<Color> and AddAssign<Color>, fixes #5543 (#5546) 2022-08-17 14:00:10 +00:00
mesh Change From<Icosphere> to TryFrom<Icosphere> (#6484) 2022-11-14 22:34:27 +00:00
primitives Very minor doc formatting changes (#5287) 2022-07-12 13:06:16 +00:00
render_graph fix nightly clippy warnings (#6395) 2022-10-28 21:03:01 +00:00
render_phase Fix clippy::iter_with_drain (#6485) 2022-11-06 01:42:15 +00:00
render_resource Fix panic when using globals uniform in wasm builds (#6460) 2022-11-07 19:44:14 +00:00
renderer fix nightly clippy warnings (#6395) 2022-10-28 21:03:01 +00:00
texture Use new let-else syntax where possible (#6463) 2022-11-04 21:32:09 +00:00
view Shrink ComputedVisibility (#6305) 2022-11-14 23:34:52 +00:00
extract_component.rs Replace WorldQueryGats trait with actual gats (#6319) 2022-11-03 16:33:05 +00:00
extract_param.rs Exclusive Systems Now Implement System. Flexible Exclusive System Params (#6083) 2022-09-26 23:57:07 +00:00
extract_resource.rs Prepare for upcoming rustlang by fixing upcoming clippy warnings (#6376) 2022-10-26 19:15:15 +00:00
globals.rs Fix panic when using globals uniform in wasm builds (#6460) 2022-11-07 19:44:14 +00:00
lib.rs Revert "Show prelude re-exports in docs (#6448)" (#6449) 2022-11-02 20:40:45 +00:00
rangefinder.rs Very minor doc formatting changes (#5287) 2022-07-12 13:06:16 +00:00
render_asset.rs Fix clippy::iter_with_drain (#6485) 2022-11-06 01:42:15 +00:00
settings.rs Make Resource trait opt-in, requiring #[derive(Resource)] V2 (#5577) 2022-08-08 21:36:35 +00:00
spatial_bundle.rs Add associated constant IDENTITY to Transform and friends. (#5340) 2022-08-30 22:10:24 +00:00