mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
bevy_render: use the non-send marker from bevy_core (#11725)
# Objective - There are too many `NonSendMarker` https://docs.rs/bevy/0.12.1/bevy/index.html?search=nonsendmarker - There should be only one ## Solution - Use the marker type from bevy_core in bevy_render --- ## Migration Guide - If you were using `bevy::render::view::NonSendMarker` or `bevy::render::view:🪟:NonSendMarker`, use `bevy::core::NonSendMarker` instead
This commit is contained in:
parent
2a1ebc4ac4
commit
9180be8069
1 changed files with 3 additions and 5 deletions
|
@ -28,10 +28,6 @@ use screenshot::{
|
|||
|
||||
use super::Msaa;
|
||||
|
||||
/// Token to ensure a system runs on the main thread.
|
||||
#[derive(Resource, Default)]
|
||||
pub struct NonSendMarker;
|
||||
|
||||
pub struct WindowRenderPlugin;
|
||||
|
||||
impl Plugin for WindowRenderPlugin {
|
||||
|
@ -440,7 +436,9 @@ pub fn need_new_surfaces(
|
|||
pub fn create_surfaces(
|
||||
// By accessing a NonSend resource, we tell the scheduler to put this system on the main thread,
|
||||
// which is necessary for some OS's
|
||||
#[cfg(any(target_os = "macos", target_os = "ios"))] _marker: Option<NonSend<NonSendMarker>>,
|
||||
#[cfg(any(target_os = "macos", target_os = "ios"))] _marker: Option<
|
||||
NonSend<bevy_core::NonSendMarker>,
|
||||
>,
|
||||
windows: Res<ExtractedWindows>,
|
||||
mut window_surfaces: ResMut<WindowSurfaces>,
|
||||
render_instance: Res<RenderInstance>,
|
||||
|
|
Loading…
Reference in a new issue