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:
François 2024-02-06 08:17:56 +01:00 committed by GitHub
parent 2a1ebc4ac4
commit 9180be8069
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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>,