1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 14:50:03 -04:00

Wgpu resources are no longer wrapped in Arc (since they are now Clone) (#5612)

Co-authored-by: Nicolas <bircni@icloud.com>
This commit is contained in:
Andreas Reich
2025-01-20 18:06:35 +01:00
committed by GitHub
parent cf965aaa30
commit 30e66e4575
6 changed files with 37 additions and 45 deletions

View File

@@ -1,5 +1,4 @@
use crate::app_kind::AppKind;
use crate::wgpu::WgpuTestRenderer;
use crate::{Harness, LazyRenderer, TestRenderer};
use egui::{Pos2, Rect, Vec2};
use std::marker::PhantomData;
@@ -75,16 +74,16 @@ impl<State> HarnessBuilder<State> {
/// Enable wgpu rendering with a default setup suitable for testing.
///
/// This sets up a [`WgpuTestRenderer`] with the default setup.
/// This sets up a [`crate::wgpu::WgpuTestRenderer`] with the default setup.
#[cfg(feature = "wgpu")]
pub fn wgpu(self) -> Self {
self.renderer(WgpuTestRenderer::default())
self.renderer(crate::wgpu::WgpuTestRenderer::default())
}
/// Enable wgpu rendering with the given setup.
#[cfg(feature = "wgpu")]
pub fn wgpu_setup(self, setup: egui_wgpu::WgpuSetup) -> Self {
self.renderer(WgpuTestRenderer::from_setup(setup))
self.renderer(crate::wgpu::WgpuTestRenderer::from_setup(setup))
}
/// Create a new Harness with the given app closure and a state.