Merge branch 'master' into wgpu/better-architecture

This commit is contained in:
Héctor Ramón Jiménez 2024-04-07 14:01:05 +02:00
commit 13289dbd19
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
41 changed files with 318 additions and 267 deletions

View file

@ -31,12 +31,13 @@ pub struct Frame {
stroke_tessellator: tessellation::StrokeTessellator,
}
#[derive(Debug)]
pub enum Geometry {
Live { meshes: Vec<Mesh>, text: Vec<Text> },
Cached(Cache),
}
#[derive(Clone)]
#[derive(Debug, Clone)]
pub struct Cache {
pub meshes: Option<triangle::Cache>,
pub text: Option<text::Cache>,

View file

@ -1,6 +1,6 @@
pub use crate::graphics::Image;
#[derive(Default)]
#[derive(Debug, Default)]
pub struct Batch;
impl Batch {

View file

@ -8,6 +8,7 @@ use crate::quad::{self, Quad};
use crate::text::{self, Text};
use crate::triangle;
#[derive(Debug)]
pub struct Layer {
pub bounds: Rectangle,
pub quads: quad::Batch,
@ -28,6 +29,7 @@ impl Default for Layer {
}
}
#[derive(Debug)]
pub struct Stack {
layers: Vec<Layer>,
transformations: Vec<Transformation>,

View file

@ -20,15 +20,8 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
#![forbid(rust_2018_idioms)]
#![deny(
// missing_debug_implementations,
//missing_docs,
unsafe_code,
unused_results,
rustdoc::broken_intra_doc_links
)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![allow(missing_docs)]
pub mod layer;
pub mod primitive;
pub mod settings;

View file

@ -16,6 +16,7 @@ const INITIAL_VERTEX_COUNT: usize = 1_000;
pub type Batch = Vec<Item>;
#[derive(Debug)]
pub enum Item {
Group {
transformation: Transformation,