Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmerlin committed Dec 12, 2024
1 parent 8f241af commit 6cceb08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions crates/eframe/src/web/web_painter_wgpu.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
4 changes: 2 additions & 2 deletions crates/egui-wgpu/src/winit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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<Event>) {
pub fn handle_screenshots(&self, events: &mut Vec<Event>) {
for (viewport_id, user_data, screenshot) in self.capture_rx.try_iter() {
let screenshot = Arc::new(screenshot);
for data in user_data {
Expand Down

0 comments on commit 6cceb08

Please sign in to comment.