Skip to content

Commit

Permalink
Apply review fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNachoBIT committed Sep 11, 2024
1 parent 36b31db commit be1bab7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
8 changes: 0 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions examples/simple/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use vello::{AaConfig, DebugLayers, Renderer, RendererOptions, Scene};
use winit::application::ApplicationHandler;
use winit::dpi::LogicalSize;
use winit::event::*;
use winit::event_loop::{ActiveEventLoop, ControlFlow, EventLoop};
use winit::event_loop::{ActiveEventLoop, EventLoop};
use winit::window::Window;

use vello::wgpu;
Expand Down Expand Up @@ -74,8 +74,6 @@ impl<'s> ApplicationHandler for SimpleVelloApp<'s> {

// Save the Window and Surface to a state variable
self.state = RenderState::Active(ActiveRenderState { window, surface });

event_loop.set_control_flow(ControlFlow::Wait);
}

fn suspended(&mut self, _event_loop: &ActiveEventLoop) {
Expand Down
7 changes: 1 addition & 6 deletions examples/with_winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use std::time::Instant;
use web_time::Instant;
use winit::application::ApplicationHandler;
use winit::event::*;
use winit::event_loop::ControlFlow;
use winit::keyboard::*;

#[cfg(all(feature = "wgpu-profiler", not(target_arch = "wasm32")))]
Expand Down Expand Up @@ -168,9 +167,7 @@ struct VelloApp<'s> {

impl<'s> ApplicationHandler<UserEvent> for VelloApp<'s> {
#[cfg(target_arch = "wasm32")]
fn resumed(&mut self, event_loop: &winit::event_loop::ActiveEventLoop) {
event_loop.set_control_flow(ControlFlow::Wait);
}
fn resumed(&mut self, event_loop: &winit::event_loop::ActiveEventLoop) {}

#[cfg(not(target_arch = "wasm32"))]
fn resumed(&mut self, event_loop: &winit::event_loop::ActiveEventLoop) {
Expand Down Expand Up @@ -228,8 +225,6 @@ impl<'s> ApplicationHandler<UserEvent> for VelloApp<'s> {
});
Some(render_state)
};

event_loop.set_control_flow(ControlFlow::Wait);
}

fn window_event(
Expand Down

0 comments on commit be1bab7

Please sign in to comment.