Skip to content

Commit

Permalink
bump vger
Browse files Browse the repository at this point in the history
  • Loading branch information
dzhou121 committed Aug 17, 2023
1 parent 028c60a commit ba87692
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ smallvec = "1.10.0"
educe = "0.4.20"
taffy = "0.3.12"
unicode-segmentation = "1.10.0"
leptos_reactive = { version = "0.5.0-alpha" }
glazier = { git = "https://github.com/lapce/glazier", features = [
"serde",
], rev = "db03ea4295daef69cb8d0877f2b2e5734cc116be" }
# glazier = { path = "../glazier", features = ["serde"] }
peniko = { git = "https://github.com/linebender/peniko", rev = "cafdac9a211a0fb2fec5656bd663d1ac770bcc81" }
wgpu = "0.15"
futures = "0.3.26"
tokio = { version = "1.21", features = ["full"] }
crossbeam-channel = "0.5.6"
once_cell = "1.17.1"
im = "15.1.0"
Expand Down
2 changes: 1 addition & 1 deletion renderer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ license.workspace = true
[dependencies]
resvg = "0.33.0"
peniko = { git = "https://github.com/linebender/peniko", rev = "cafdac9a211a0fb2fec5656bd663d1ac770bcc81" }
cosmic-text = { git = "https://github.com/lapce/cosmic-text", rev = "25f260eced296296ca22d22a04cbb3026f5fe2a2" }
cosmic-text = { git = "https://github.com/lapce/cosmic-text", rev = "061ca70e105f920b21f1dd24c5d5c89592f3cf64" }
# cosmic-text = { path = "../../cosmic-text" }
4 changes: 2 additions & 2 deletions vger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ license.workspace = true

[dependencies]
resvg = "0.33.0"
wgpu = "0.15.1"
wgpu = "0.17.0"
raw-window-handle = "0.5.1"
futures = "0.3.26"
anyhow = "1.0.69"
peniko = { git = "https://github.com/linebender/peniko", rev = "cafdac9a211a0fb2fec5656bd663d1ac770bcc81" }
swash = "0.1.8"
vger = { git = "https://github.com/lapce/vger-rs", rev = "c272ceecbfdc1eea310fd132173155629db63ed5" }
vger = { git = "https://github.com/lapce/vger-rs", rev = "d8054007a865a734d3aa5000af3aec9d4964ead6" }
# vger = { path = "../../vger-rs" }
floem_renderer = { path = "../renderer" }
12 changes: 8 additions & 4 deletions vger/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::sync::Arc;

use anyhow::Result;
use floem_renderer::cosmic_text::{SubpixelBin, SwashCache, SwashImage, TextLayout};
use floem_renderer::{tiny_skia, Renderer};
Expand All @@ -9,8 +11,8 @@ use vger::{PaintIndex, Vger};
use wgpu::{Device, Queue, Surface, SurfaceConfiguration, TextureFormat};

pub struct VgerRenderer {
device: Device,
queue: Queue,
device: Arc<Device>,
queue: Arc<Queue>,
surface: Surface,
vger: Vger,
config: SurfaceConfiguration,
Expand Down Expand Up @@ -48,6 +50,8 @@ impl VgerRenderer {
},
None,
))?;
let device = Arc::new(device);
let queue = Arc::new(queue);

let surface_caps = surface.get_capabilities(&adapter);
let texture_format = surface_caps
Expand All @@ -67,7 +71,7 @@ impl VgerRenderer {
};
surface.configure(&device, &config);

let vger = vger::Vger::new(&device, texture_format);
let vger = vger::Vger::new(device.clone(), queue.clone(), texture_format);

Ok(Self {
device,
Expand Down Expand Up @@ -384,7 +388,7 @@ impl Renderer for VgerRenderer {
depth_stencil_attachment: None,
};

self.vger.encode(&self.device, &desc, &self.queue);
self.vger.encode(&desc);
frame.present();
}
}
Expand Down

0 comments on commit ba87692

Please sign in to comment.