Initial update to winit 0.30.0 (#559)

This doesn't yet implement the new application handler trait.
diff --git a/Cargo.lock b/Cargo.lock
index 778e24f..992e5e0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -69,7 +69,7 @@
  "accesskit_macos",
  "accesskit_windows",
  "raw-window-handle",
- "winit",
+ "winit 0.29.15",
 ]
 
 [[package]]
@@ -120,9 +120,30 @@
  "jni-sys",
  "libc",
  "log",
- "ndk",
+ "ndk 0.8.0",
  "ndk-context",
- "ndk-sys",
+ "ndk-sys 0.5.0+25.2.9519653",
+ "num_enum",
+ "thiserror",
+]
+
+[[package]]
+name = "android-activity"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046"
+dependencies = [
+ "android-properties",
+ "bitflags 2.5.0",
+ "cc",
+ "cesu8",
+ "jni",
+ "jni-sys",
+ "libc",
+ "log",
+ "ndk 0.9.0",
+ "ndk-context",
+ "ndk-sys 0.6.0+11769913",
  "num_enum",
  "thiserror",
 ]
@@ -868,7 +889,7 @@
  "thiserror",
  "tracing",
  "uuid",
- "web-time",
+ "web-time 0.2.4",
 ]
 
 [[package]]
@@ -921,7 +942,7 @@
  "raw-window-handle",
  "wasm-bindgen",
  "web-sys",
- "winit",
+ "winit 0.29.15",
 ]
 
 [[package]]
@@ -994,7 +1015,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7"
 dependencies = [
- "objc-sys 0.3.2",
+ "objc-sys 0.3.3",
 ]
 
 [[package]]
@@ -1018,6 +1039,15 @@
 ]
 
 [[package]]
+name = "block2"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43ff7d91d3c1d568065b06c899777d1e48dcf76103a672a0adbc238a7f247f1e"
+dependencies = [
+ "objc2 0.5.1",
+]
+
+[[package]]
 name = "blocking"
 version = "1.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1148,6 +1178,12 @@
 checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
 
 [[package]]
+name = "cfg_aliases"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77e53693616d3075149f4ead59bdeecd204ac6b8192d8969757601b74bddf00f"
+
+[[package]]
 name = "clap"
 version = "4.5.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1488,6 +1524,12 @@
 checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
 
 [[package]]
+name = "dpi"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53"
+
+[[package]]
 name = "dyn-clone"
 version = "1.0.17"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2498,7 +2540,22 @@
  "bitflags 2.5.0",
  "jni-sys",
  "log",
- "ndk-sys",
+ "ndk-sys 0.5.0+25.2.9519653",
+ "num_enum",
+ "raw-window-handle",
+ "thiserror",
+]
+
+[[package]]
+name = "ndk"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4"
+dependencies = [
+ "bitflags 2.5.0",
+ "jni-sys",
+ "log",
+ "ndk-sys 0.6.0+11769913",
  "num_enum",
  "raw-window-handle",
  "thiserror",
@@ -2520,6 +2577,15 @@
 ]
 
 [[package]]
+name = "ndk-sys"
+version = "0.6.0+11769913"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873"
+dependencies = [
+ "jni-sys",
+]
+
+[[package]]
 name = "newline-converter"
 version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2630,9 +2696,9 @@
 
 [[package]]
 name = "objc-sys"
-version = "0.3.2"
+version = "0.3.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7c71324e4180d0899963fc83d9d241ac39e699609fc1025a850aadac8257459"
+checksum = "da284c198fb9b7b0603f8635185e85fbd5b64ee154b1ed406d489077de2d6d60"
 
 [[package]]
 name = "objc2"
@@ -2651,11 +2717,44 @@
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d"
 dependencies = [
- "objc-sys 0.3.2",
+ "objc-sys 0.3.3",
  "objc2-encode 3.0.0",
 ]
 
 [[package]]
+name = "objc2"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4b25e1034d0e636cd84707ccdaa9f81243d399196b8a773946dcffec0401659"
+dependencies = [
+ "objc-sys 0.3.3",
+ "objc2-encode 4.0.1",
+]
+
+[[package]]
+name = "objc2-app-kit"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb79768a710a9a1798848179edb186d1af7e8a8679f369e4b8d201dd2a034047"
+dependencies = [
+ "block2 0.5.0",
+ "objc2 0.5.1",
+ "objc2-core-data",
+ "objc2-foundation",
+]
+
+[[package]]
+name = "objc2-core-data"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e092bc42eaf30a08844e6a076938c60751225ec81431ab89f5d1ccd9f958d6c"
+dependencies = [
+ "block2 0.5.0",
+ "objc2 0.5.1",
+ "objc2-foundation",
+]
+
+[[package]]
 name = "objc2-encode"
 version = "2.0.0-pre.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2671,6 +2770,23 @@
 checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666"
 
 [[package]]
+name = "objc2-encode"
+version = "4.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "88658da63e4cc2c8adb1262902cd6af51094df0488b760d6fd27194269c0950a"
+
+[[package]]
+name = "objc2-foundation"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfaefe14254871ea16c7d88968c0ff14ba554712a20d76421eec52f0a7fb8904"
+dependencies = [
+ "block2 0.5.0",
+ "dispatch",
+ "objc2 0.5.1",
+]
+
+[[package]]
 name = "objc_exception"
 version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2777,6 +2893,26 @@
 checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315"
 
 [[package]]
+name = "pin-project"
+version = "1.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3"
+dependencies = [
+ "pin-project-internal",
+]
+
+[[package]]
+name = "pin-project-internal"
+version = "1.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.55",
+]
+
+[[package]]
 name = "pin-project-lite"
 version = "0.2.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3218,9 +3354,9 @@
 
 [[package]]
 name = "sctk-adwaita"
-version = "0.8.1"
+version = "0.9.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82b2eaf3a5b264a521b988b2e73042e742df700c4f962cde845d1541adb46550"
+checksum = "7de61fa7334ee8ee1f5c3c58dcc414fb9361e7e8f5bff9d45f4d69eeb89a7169"
 dependencies = [
  "ab_glyph",
  "log",
@@ -3313,7 +3449,7 @@
  "pollster",
  "vello",
  "wgpu",
- "winit",
+ "winit 0.30.0",
 ]
 
 [[package]]
@@ -4195,6 +4331,16 @@
 ]
 
 [[package]]
+name = "web-time"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
 name = "webpki-roots"
 version = "0.26.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4217,7 +4363,7 @@
 dependencies = [
  "arrayvec",
  "cfg-if",
- "cfg_aliases",
+ "cfg_aliases 0.1.1",
  "js-sys",
  "log",
  "naga",
@@ -4243,7 +4389,7 @@
  "arrayvec",
  "bit-vec",
  "bitflags 2.5.0",
- "cfg_aliases",
+ "cfg_aliases 0.1.1",
  "codespan-reporting",
  "indexmap 2.2.6",
  "log",
@@ -4272,7 +4418,7 @@
  "bit-set",
  "bitflags 2.5.0",
  "block",
- "cfg_aliases",
+ "cfg_aliases 0.1.1",
  "core-graphics-types",
  "d3d12",
  "glow",
@@ -4288,7 +4434,7 @@
  "log",
  "metal",
  "naga",
- "ndk-sys",
+ "ndk-sys 0.5.0+25.2.9519653",
  "objc",
  "once_cell",
  "parking_lot",
@@ -4620,13 +4766,12 @@
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "0d59ad965a635657faf09c8f062badd885748428933dad8e8bdd64064d92e5ca"
 dependencies = [
- "ahash",
- "android-activity",
+ "android-activity 0.5.2",
  "atomic-waker",
  "bitflags 2.5.0",
  "bytemuck",
  "calloop",
- "cfg_aliases",
+ "cfg_aliases 0.1.1",
  "core-foundation",
  "core-graphics",
  "cursor-icon",
@@ -4634,9 +4779,8 @@
  "js-sys",
  "libc",
  "log",
- "memmap2",
- "ndk",
- "ndk-sys",
+ "ndk 0.8.0",
+ "ndk-sys 0.5.0+25.2.9519653",
  "objc2 0.4.1",
  "once_cell",
  "orbclient",
@@ -4644,9 +4788,53 @@
  "raw-window-handle",
  "redox_syscall 0.3.5",
  "rustix",
+ "smol_str",
+ "unicode-segmentation",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "web-sys",
+ "web-time 0.2.4",
+ "windows-sys 0.48.0",
+ "x11-dl",
+ "x11rb",
+ "xkbcommon-dl",
+]
+
+[[package]]
+name = "winit"
+version = "0.30.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea9e6d5d66cbf702e0dd820302144f51b69a95acdc495dd98ca280ff206562b1"
+dependencies = [
+ "ahash",
+ "android-activity 0.6.0",
+ "atomic-waker",
+ "bitflags 2.5.0",
+ "bytemuck",
+ "calloop",
+ "cfg_aliases 0.2.0",
+ "concurrent-queue",
+ "core-foundation",
+ "core-graphics",
+ "cursor-icon",
+ "dpi",
+ "js-sys",
+ "libc",
+ "memmap2",
+ "ndk 0.9.0",
+ "objc2 0.5.1",
+ "objc2-app-kit",
+ "objc2-foundation",
+ "orbclient",
+ "percent-encoding",
+ "pin-project",
+ "raw-window-handle",
+ "redox_syscall 0.4.1",
+ "rustix",
  "sctk-adwaita",
  "smithay-client-toolkit",
  "smol_str",
+ "tracing",
  "unicode-segmentation",
  "wasm-bindgen",
  "wasm-bindgen-futures",
@@ -4655,8 +4843,8 @@
  "wayland-protocols",
  "wayland-protocols-plasma",
  "web-sys",
- "web-time",
- "windows-sys 0.48.0",
+ "web-time 1.1.0",
+ "windows-sys 0.52.0",
  "x11-dl",
  "x11rb",
  "xkbcommon-dl",
@@ -4704,7 +4892,7 @@
  "web-sys",
  "wgpu",
  "wgpu-profiler",
- "winit",
+ "winit 0.30.0",
 ]
 
 [[package]]
diff --git a/examples/simple/Cargo.toml b/examples/simple/Cargo.toml
index 8d4a608..5057f40 100644
--- a/examples/simple/Cargo.toml
+++ b/examples/simple/Cargo.toml
@@ -16,4 +16,4 @@
 anyhow = "1.0.81"
 pollster = "0.3.0"
 wgpu = "0.19.4"
-winit = "0.29.15"
+winit = "0.30.0"
diff --git a/examples/simple/src/main.rs b/examples/simple/src/main.rs
index 1f4758e..512effa 100644
--- a/examples/simple/src/main.rs
+++ b/examples/simple/src/main.rs
@@ -10,8 +10,8 @@
 use vello::{AaConfig, Renderer, RendererOptions, Scene};
 use winit::dpi::LogicalSize;
 use winit::event::*;
-use winit::event_loop::{ControlFlow, EventLoop};
-use winit::window::{Window, WindowBuilder};
+use winit::event_loop::{ActiveEventLoop, ControlFlow, EventLoop};
+use winit::window::Window;
 
 // Simple struct to hold the state of the renderer
 pub struct ActiveRenderState<'s> {
@@ -44,6 +44,7 @@
 
     // Create and run a winit event loop
     let event_loop = EventLoop::new()?;
+    #[allow(deprecated)]
     event_loop
         .run(move |event, event_loop| match event {
             // Setup renderer. In winit apps it is recommended to do setup in Event::Resumed
@@ -173,15 +174,12 @@
 }
 
 /// Helper function that creates a Winit window and returns it (wrapped in an Arc for sharing between threads)
-fn create_winit_window(event_loop: &winit::event_loop::EventLoopWindowTarget<()>) -> Arc<Window> {
-    Arc::new(
-        WindowBuilder::new()
-            .with_inner_size(LogicalSize::new(1044, 800))
-            .with_resizable(true)
-            .with_title("Vello Shapes")
-            .build(event_loop)
-            .unwrap(),
-    )
+fn create_winit_window(event_loop: &ActiveEventLoop) -> Arc<Window> {
+    let attr = Window::default_attributes()
+        .with_inner_size(LogicalSize::new(1044, 800))
+        .with_resizable(true)
+        .with_title("Vello Shapes");
+    Arc::new(event_loop.create_window(attr).unwrap())
 }
 
 /// Helper function that creates a vello `Renderer` for a given `RenderContext` and `RenderSurface`
diff --git a/examples/with_winit/Cargo.toml b/examples/with_winit/Cargo.toml
index 96b3492..ab9d6ac 100644
--- a/examples/with_winit/Cargo.toml
+++ b/examples/with_winit/Cargo.toml
@@ -35,7 +35,7 @@
 wgpu-profiler = { workspace = true, optional = true }
 
 wgpu = { workspace = true }
-winit = "0.29.15"
+winit = "0.30.0"
 log = { workspace = true }
 
 # We're still using env-logger, but we want to use tracing spans to allow using
@@ -52,7 +52,7 @@
 
 
 [target.'cfg(target_os = "android")'.dependencies]
-winit = { version = "0.29.15", features = ["android-native-activity"] }
+winit = { version = "0.30.0", features = ["android-native-activity"] }
 android_logger = "0.13.3"
 
 tracing_android_trace = "0.1.0"
diff --git a/examples/with_winit/src/lib.rs b/examples/with_winit/src/lib.rs
index 8346274..8fd0c09 100644
--- a/examples/with_winit/src/lib.rs
+++ b/examples/with_winit/src/lib.rs
@@ -13,8 +13,9 @@
 use vello::util::{RenderContext, RenderSurface};
 use vello::{AaConfig, BumpAllocators, Renderer, RendererOptions, Scene};
 
-use winit::event_loop::{EventLoop, EventLoopBuilder};
-use winit::window::Window;
+use winit::dpi::LogicalSize;
+use winit::event_loop::EventLoop;
+use winit::window::{Window, WindowAttributes};
 
 #[cfg(not(any(target_arch = "wasm32", target_os = "android")))]
 mod hot_reload;
@@ -181,6 +182,7 @@
     }
     let mut prev_scene_ix = scene_ix - 1;
     let mut modifiers = ModifiersState::default();
+    #[allow(deprecated)]
     event_loop
         .run(move |event, event_loop| match event {
             Event::WindowEvent {
@@ -581,9 +583,9 @@
                 #[cfg(not(target_arch = "wasm32"))]
                 {
                     let Option::None = render_state else { return };
-                    let window = cached_window
-                        .take()
-                        .unwrap_or_else(|| create_window(event_loop));
+                    let window = cached_window.take().unwrap_or_else(|| {
+                        Arc::new(event_loop.create_window(window_attributes()).unwrap())
+                    });
                     let size = window.inner_size();
                     let present_mode = if vsync_on {
                         wgpu::PresentMode::AutoVsync
@@ -660,17 +662,11 @@
     }
 }
 
-fn create_window(event_loop: &winit::event_loop::EventLoopWindowTarget<UserEvent>) -> Arc<Window> {
-    use winit::dpi::LogicalSize;
-    use winit::window::WindowBuilder;
-    Arc::new(
-        WindowBuilder::new()
-            .with_inner_size(LogicalSize::new(1044, 800))
-            .with_resizable(true)
-            .with_title("Vello demo")
-            .build(event_loop)
-            .unwrap(),
-    )
+fn window_attributes() -> WindowAttributes {
+    Window::default_attributes()
+        .with_inner_size(LogicalSize::new(1044, 800))
+        .with_resizable(true)
+        .with_title("Vello demo")
 }
 
 #[derive(Debug)]
@@ -711,7 +707,7 @@
     let args = parse_arguments();
     let scenes = args.args.select_scene_set(Args::command)?;
     if let Some(scenes) = scenes {
-        let event_loop = EventLoopBuilder::<UserEvent>::with_user_event().build()?;
+        let event_loop = EventLoop::<UserEvent>::with_user_event().build()?;
         #[allow(unused_mut)]
         let mut render_cx = RenderContext::new();
         #[cfg(not(target_arch = "wasm32"))]
@@ -728,7 +724,8 @@
             std::panic::set_hook(Box::new(console_error_panic_hook::hook));
             console_log::init().expect("could not initialize logger");
             use winit::platform::web::WindowExtWebSys;
-            let window = create_window(&event_loop);
+            #[allow(deprecated)]
+            let window = Arc::new(event_loop.create_window(window_attributes()).unwrap());
             // On wasm, append the canvas to the document body
             let canvas = window.canvas().unwrap();
             web_sys::window()
@@ -826,7 +823,7 @@
         tracing::level_filters::LevelFilter::current()
     );
 
-    let event_loop = EventLoopBuilder::with_user_event()
+    let event_loop = EventLoop::with_user_event()
         .with_android_app(app)
         .build()
         .expect("Required to continue");