mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-09 20:31:29 +11:00
Update to piet 0.13
Get rid of kurbo patch, as we now use kurbo through piet. Also clean up some warnings.
This commit is contained in:
parent
c1f4f66a8f
commit
8d01aba237
10
Cargo.lock
generated
10
Cargo.lock
generated
|
@ -295,8 +295,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "kurbo"
|
||||
version = "0.5.11"
|
||||
source = "git+https://github.com/linebender/kurbo?rev=7bd7e66bd137e757305d170a0f9f2b4f7beeb299#7bd7e66bd137e757305d170a0f9f2b4f7beeb299"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5657aca5a36917d389d717f1a0c24d5ebcee5551fda8c1f555af597565d408e4"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
]
|
||||
|
@ -513,9 +514,9 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
|
|||
|
||||
[[package]]
|
||||
name = "piet"
|
||||
version = "0.0.12"
|
||||
version = "0.0.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "29420eccb68d6b9ad2f8dd87caf9c3bcd3bbd056bfe67871c48b6efab9316b79"
|
||||
checksum = "552531e1eeb85c966172849155b25b555f76c10cc479396579fac058a63269a4"
|
||||
dependencies = [
|
||||
"kurbo",
|
||||
]
|
||||
|
@ -524,7 +525,6 @@ dependencies = [
|
|||
name = "piet-gpu"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"kurbo",
|
||||
"piet",
|
||||
"piet-gpu-hal",
|
||||
"piet-gpu-types",
|
||||
|
|
|
@ -6,7 +6,3 @@ members = [
|
|||
"piet-gpu-hal",
|
||||
"piet-gpu-types"
|
||||
]
|
||||
|
||||
# TODO: remove when the flatten feature is published
|
||||
[patch.crates-io]
|
||||
kurbo = { git = "https://github.com/linebender/kurbo", rev = "7bd7e66bd137e757305d170a0f9f2b4f7beeb299" }
|
||||
|
|
|
@ -62,7 +62,8 @@ pub struct Buffer {
|
|||
|
||||
pub struct Image {
|
||||
image: vk::Image,
|
||||
image_memory: vk::DeviceMemory,
|
||||
// Not used now but probably will be for destruction.
|
||||
_image_memory: vk::DeviceMemory,
|
||||
image_view: vk::ImageView,
|
||||
extent: vk::Extent3D,
|
||||
}
|
||||
|
@ -475,7 +476,7 @@ impl crate::Device for VkDevice {
|
|||
)?;
|
||||
Ok(Image {
|
||||
image,
|
||||
image_memory,
|
||||
_image_memory: image_memory,
|
||||
image_view,
|
||||
extent,
|
||||
})
|
||||
|
@ -984,7 +985,7 @@ impl VkSwapchain {
|
|||
pub unsafe fn image(&self, idx: usize) -> Image {
|
||||
Image {
|
||||
image: self.images[idx],
|
||||
image_memory: vk::DeviceMemory::null(),
|
||||
_image_memory: vk::DeviceMemory::null(),
|
||||
image_view: vk::ImageView::null(),
|
||||
extent: vk::Extent3D {
|
||||
width: self.extent.width,
|
||||
|
|
|
@ -21,8 +21,7 @@ path = "../piet-gpu-hal"
|
|||
path = "../piet-gpu-types"
|
||||
|
||||
[dependencies]
|
||||
kurbo = "0.5.11"
|
||||
piet = "0.0.12"
|
||||
piet = "0.0.13"
|
||||
png = "0.16.2"
|
||||
rand = "0.7.3"
|
||||
roxmltree = "0.11"
|
||||
|
|
|
@ -2,9 +2,6 @@ use std::fs::File;
|
|||
use std::io::BufWriter;
|
||||
use std::path::Path;
|
||||
|
||||
|
||||
use piet::Color;
|
||||
|
||||
use piet_gpu_hal::vulkan::VkInstance;
|
||||
use piet_gpu_hal::{CmdBuf, Device, Error, MemFlags};
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ use rand::{Rng, RngCore};
|
|||
use piet::kurbo::{BezPath, Circle, Line, Point, Vec2};
|
||||
use piet::{Color, RenderContext};
|
||||
|
||||
use piet_gpu_hal::vulkan::VkInstance;
|
||||
use piet_gpu_hal::{CmdBuf, Device, Error, ImageLayout, MemFlags};
|
||||
|
||||
use pico_svg::PicoSvg;
|
||||
|
|
|
@ -4,7 +4,7 @@ use std::str::FromStr;
|
|||
|
||||
use roxmltree::Document;
|
||||
|
||||
use kurbo::BezPath;
|
||||
use piet::kurbo::{Affine, BezPath};
|
||||
|
||||
use piet::{Color, RenderContext};
|
||||
|
||||
|
@ -38,7 +38,7 @@ impl PicoSvg {
|
|||
if el.is_element() {
|
||||
let d = el.attribute("d").ok_or("missing 'd' attribute")?;
|
||||
let bp = BezPath::from_svg(d)?;
|
||||
let path = kurbo::Affine::scale(scale) * bp;
|
||||
let path = Affine::scale(scale) * bp;
|
||||
if let Some(fill_color) = el.attribute("fill") {
|
||||
let color = parse_color(fill_color);
|
||||
items.push(Item::Fill(FillItem { color, path: path.clone() }));
|
||||
|
|
|
@ -248,7 +248,7 @@ fn flatten_shape(
|
|||
let mut points = Vec::new();
|
||||
let mut start_pt = None;
|
||||
let mut last_pt = None;
|
||||
kurbo::flatten(path, TOLERANCE, |el| {
|
||||
piet::kurbo::flatten(path, TOLERANCE, |el| {
|
||||
match el {
|
||||
PathEl::MoveTo(p) => {
|
||||
let scene_pt = to_scene_point(p);
|
||||
|
@ -296,7 +296,7 @@ impl Text for PietGpuText {
|
|||
&mut self,
|
||||
_font: &Self::Font,
|
||||
_text: &str,
|
||||
_width: f64,
|
||||
_width: impl Into<Option<f64>>,
|
||||
) -> Self::TextLayoutBuilder {
|
||||
unimplemented!();
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ impl TextLayout for PietGpuTextLayout {
|
|||
0.0
|
||||
}
|
||||
|
||||
fn update_width(&mut self, _new_width: f64) -> Result<(), Error> {
|
||||
fn update_width(&mut self, _new_width: impl Into<Option<f64>>) -> Result<(), Error> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue