Make iced_tiny_skia optional with a tiny-skia feature
This commit is contained in:
parent
bbafeed13d
commit
1f13a91361
20 changed files with 157 additions and 91 deletions
|
|
@ -7,6 +7,7 @@ use crate::primitive::{self, Primitive};
|
|||
use crate::quad;
|
||||
use crate::text;
|
||||
use crate::triangle;
|
||||
use crate::window;
|
||||
use crate::{Layer, Settings};
|
||||
|
||||
#[cfg(feature = "tracing")]
|
||||
|
|
@ -372,6 +373,7 @@ impl Backend {
|
|||
}
|
||||
|
||||
impl crate::graphics::Backend for Backend {
|
||||
type Compositor = window::Compositor;
|
||||
type Primitive = primitive::Custom;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//! Draw primitives using custom pipelines.
|
||||
use crate::core::{Rectangle, Size};
|
||||
use crate::core::{self, Rectangle, Size};
|
||||
|
||||
use std::any::{Any, TypeId};
|
||||
use std::collections::HashMap;
|
||||
|
|
@ -58,7 +58,7 @@ pub trait Primitive: Debug + Send + Sync + 'static {
|
|||
}
|
||||
|
||||
/// A renderer than can draw custom pipeline primitives.
|
||||
pub trait Renderer: crate::core::Renderer {
|
||||
pub trait Renderer: core::Renderer {
|
||||
/// Draws a custom pipeline primitive.
|
||||
fn draw_pipeline_primitive(
|
||||
&mut self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue