mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 14:48:11 +08:00
Extract pipelines from WgpuExecutor into scope-provided pipeline nodes (#4210)
* Implement generic pipeline caching * Fix WIP * Fix * Fix * Fix * Fix bench * Migrations * Review
This commit is contained in:
@@ -29,7 +29,7 @@ pub(crate) struct RenderState {
|
||||
impl RenderState {
|
||||
pub(crate) fn new(window: &Window, context: WgpuContext, present_mode: Option<PresentMode>) -> Self {
|
||||
let size = window.surface_size();
|
||||
let surface = window.create_surface(context.instance.clone());
|
||||
let surface = window.create_surface(&context.instance);
|
||||
|
||||
let surface_caps = surface.get_capabilities(&context.adapter);
|
||||
let surface_format = surface_caps.formats.iter().find(|f| f.is_srgb()).copied().unwrap_or(surface_caps.formats[0]);
|
||||
|
||||
@@ -86,7 +86,7 @@ impl Window {
|
||||
self.winit_window.request_redraw();
|
||||
}
|
||||
|
||||
pub(crate) fn create_surface(&self, instance: Arc<wgpu::Instance>) -> wgpu::Surface<'static> {
|
||||
pub(crate) fn create_surface(&self, instance: &wgpu::Instance) -> wgpu::Surface<'static> {
|
||||
instance.create_surface(self.winit_window.clone()).unwrap()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user