Skip to content

Commit a35fb63

Browse files
committed
lints
1 parent ef25f73 commit a35fb63

File tree

2 files changed

+43
-50
lines changed

2 files changed

+43
-50
lines changed

Diff for: crates/bevy_render/src/view/visibility/mod.rs

+42-40
Original file line numberDiff line numberDiff line change
@@ -215,46 +215,48 @@ impl Plugin for VisibilityPlugin {
215215
fn build(&self, app: &mut bevy_app::App) {
216216
use VisibilitySystems::*;
217217

218-
app.configure_sets(
219-
PostUpdate,
220-
PropagateRenderGroupsSet.in_set(VisibilityPropagate),
221-
)
222-
.add_systems(
223-
PostUpdate,
224-
(
225-
calculate_bounds.in_set(CalculateBounds),
226-
update_frusta::<OrthographicProjection>
227-
.in_set(UpdateOrthographicFrusta)
228-
.after(camera_system::<OrthographicProjection>)
229-
.after(TransformSystem::TransformPropagate)
230-
// We assume that no camera will have more than one projection component,
231-
// so these systems will run independently of one another.
232-
// FIXME: Add an archetype invariant for this https://github.com/bevyengine/bevy/issues/1481.
233-
.ambiguous_with(update_frusta::<PerspectiveProjection>)
234-
.ambiguous_with(update_frusta::<Projection>),
235-
update_frusta::<PerspectiveProjection>
236-
.in_set(UpdatePerspectiveFrusta)
237-
.after(camera_system::<PerspectiveProjection>)
238-
.after(TransformSystem::TransformPropagate)
239-
// We assume that no camera will have more than one projection component,
240-
// so these systems will run independently of one another.
241-
// FIXME: Add an archetype invariant for this https://github.com/bevyengine/bevy/issues/1481.
242-
.ambiguous_with(update_frusta::<Projection>),
243-
update_frusta::<Projection>
244-
.in_set(UpdateProjectionFrusta)
245-
.after(camera_system::<Projection>)
246-
.after(TransformSystem::TransformPropagate),
247-
(visibility_propagate_system, reset_view_visibility).in_set(VisibilityPropagate),
248-
check_visibility
249-
.in_set(CheckVisibility)
250-
.after(CalculateBounds)
251-
.after(UpdateOrthographicFrusta)
252-
.after(UpdatePerspectiveFrusta)
253-
.after(UpdateProjectionFrusta)
254-
.after(VisibilityPropagate)
255-
.after(TransformSystem::TransformPropagate),
256-
),
257-
);
218+
app.add_plugins(PropagateRenderGroupsPlugin)
219+
.configure_sets(
220+
PostUpdate,
221+
PropagateRenderGroupsSet.in_set(VisibilityPropagate),
222+
)
223+
.add_systems(
224+
PostUpdate,
225+
(
226+
calculate_bounds.in_set(CalculateBounds),
227+
update_frusta::<OrthographicProjection>
228+
.in_set(UpdateOrthographicFrusta)
229+
.after(camera_system::<OrthographicProjection>)
230+
.after(TransformSystem::TransformPropagate)
231+
// We assume that no camera will have more than one projection component,
232+
// so these systems will run independently of one another.
233+
// FIXME: Add an archetype invariant for this https://github.com/bevyengine/bevy/issues/1481.
234+
.ambiguous_with(update_frusta::<PerspectiveProjection>)
235+
.ambiguous_with(update_frusta::<Projection>),
236+
update_frusta::<PerspectiveProjection>
237+
.in_set(UpdatePerspectiveFrusta)
238+
.after(camera_system::<PerspectiveProjection>)
239+
.after(TransformSystem::TransformPropagate)
240+
// We assume that no camera will have more than one projection component,
241+
// so these systems will run independently of one another.
242+
// FIXME: Add an archetype invariant for this https://github.com/bevyengine/bevy/issues/1481.
243+
.ambiguous_with(update_frusta::<Projection>),
244+
update_frusta::<Projection>
245+
.in_set(UpdateProjectionFrusta)
246+
.after(camera_system::<Projection>)
247+
.after(TransformSystem::TransformPropagate),
248+
(visibility_propagate_system, reset_view_visibility)
249+
.in_set(VisibilityPropagate),
250+
check_visibility
251+
.in_set(CheckVisibility)
252+
.after(CalculateBounds)
253+
.after(UpdateOrthographicFrusta)
254+
.after(UpdatePerspectiveFrusta)
255+
.after(UpdateProjectionFrusta)
256+
.after(VisibilityPropagate)
257+
.after(TransformSystem::TransformPropagate),
258+
),
259+
);
258260
}
259261
}
260262

Diff for: crates/bevy_render/src/view/visibility/propagate_render_groups.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ The base-line performance cost of this algorithm comes from detecting changes, w
136136
use crate::view::*;
137137

138138
use crate::prelude::Camera;
139-
use bevy_app::{App, Plugin, PostUpdate};
139+
use bevy_app::PostUpdate;
140140
use bevy_derive::Deref;
141141
use bevy_ecs::entity::EntityHashSet;
142142
use bevy_ecs::prelude::*;
@@ -274,15 +274,6 @@ pub struct InheritedRenderGroups {
274274
pub computed: RenderGroups,
275275
}
276276

277-
impl InheritedRenderGroups {
278-
fn empty() -> Self {
279-
Self {
280-
propagator: Entity::PLACEHOLDER,
281-
computed: RenderGroups::empty(),
282-
}
283-
}
284-
}
285-
286277
/// Contains the final [`RenderGroups`] of an entity for extraction to the render world.
287278
#[derive(Component, Debug, Deref)]
288279
pub struct ExtractedRenderGroups(RenderGroups);

0 commit comments

Comments
 (0)