From 6cceb0894bd2cc5e3887a142b72e9e8b88101d4e Mon Sep 17 00:00:00 2001 From: Lucas Meurer Date: Thu, 12 Dec 2024 17:31:11 +0100 Subject: [PATCH] Small fixes --- crates/eframe/src/web/web_painter_wgpu.rs | 3 +-- crates/egui-wgpu/src/winit.rs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/eframe/src/web/web_painter_wgpu.rs b/crates/eframe/src/web/web_painter_wgpu.rs index 2b3089de1fc..591d4224d3b 100644 --- a/crates/eframe/src/web/web_painter_wgpu.rs +++ b/crates/eframe/src/web/web_painter_wgpu.rs @@ -1,7 +1,6 @@ -use std::sync::{mpsc, Arc}; +use std::sync::Arc; use super::web_painter::WebPainter; -use crate::epaint::ColorImage; use crate::WebOptions; use egui::{Event, UserData, ViewportId}; use egui_wgpu::capture::{capture_channel, CaptureReceiver, CaptureSender, CaptureState}; diff --git a/crates/egui-wgpu/src/winit.rs b/crates/egui-wgpu/src/winit.rs index 5dc345f946e..cf7c041f002 100644 --- a/crates/egui-wgpu/src/winit.rs +++ b/crates/egui-wgpu/src/winit.rs @@ -362,7 +362,7 @@ impl Painter { /// The approximate number of seconds spent on vsync-waiting (if any), /// and the captures captured screenshot if it was requested. /// - /// If capture_data isn't empty, a screenshot will be captured. + /// If `capture_data` isn't empty, a screenshot will be captured. pub fn paint_and_update_textures( &mut self, viewport_id: ViewportId, @@ -563,7 +563,7 @@ impl Painter { } /// Call this at the beginning of each frame to receive the requested screenshots. - pub fn handle_screenshots(&mut self, events: &mut Vec) { + pub fn handle_screenshots(&self, events: &mut Vec) { for (viewport_id, user_data, screenshot) in self.capture_rx.try_iter() { let screenshot = Arc::new(screenshot); for data in user_data {