mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Extend WgpuSetup, egui_kittest now prefers software rasterizers for testing (#5506)
This commit is contained in:
@@ -51,7 +51,7 @@ impl Painter {
|
||||
/// [`set_window()`](Self::set_window) once you have
|
||||
/// a [`winit::window::Window`] with a valid `.raw_window_handle()`
|
||||
/// associated.
|
||||
pub fn new(
|
||||
pub async fn new(
|
||||
context: Context,
|
||||
configuration: WgpuConfiguration,
|
||||
msaa_samples: u32,
|
||||
@@ -59,17 +59,8 @@ impl Painter {
|
||||
support_transparent_backbuffer: bool,
|
||||
dithering: bool,
|
||||
) -> Self {
|
||||
let instance = match &configuration.wgpu_setup {
|
||||
crate::WgpuSetup::CreateNew {
|
||||
supported_backends, ..
|
||||
} => Arc::new(wgpu::Instance::new(wgpu::InstanceDescriptor {
|
||||
backends: *supported_backends,
|
||||
..Default::default()
|
||||
})),
|
||||
crate::WgpuSetup::Existing { instance, .. } => instance.clone(),
|
||||
};
|
||||
|
||||
let (capture_tx, capture_rx) = capture_channel();
|
||||
let instance = configuration.wgpu_setup.new_instance().await;
|
||||
|
||||
Self {
|
||||
context,
|
||||
|
||||
Reference in New Issue
Block a user