File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ pub trait Ctx : Clone + Send { }
2+
3+ impl < T : Ctx > Ctx for Option < T > { }
4+ impl < T : Ctx + Sync > Ctx for & T { }
5+ impl Ctx for ( ) { }
6+
7+ pub trait ArcCtx : Send + Sync { }
8+ #[ cfg( feature = "std" ) ]
9+ impl < T : ArcCtx > Ctx for std:: sync:: Arc < T > { }
Original file line number Diff line number Diff line change 1- pub use glam;
2-
31pub mod blending;
42pub mod choice_type;
53pub mod color;
4+ pub mod context;
65pub mod registry;
76
7+ pub use context:: Ctx ;
8+ pub use glam;
9+
810pub trait AsU32 {
911 fn as_u32 ( & self ) -> u32 ;
1012}
Original file line number Diff line number Diff line change 11use crate :: transform:: Footprint ;
2+ pub use graphene_core_shaders:: context:: { ArcCtx , Ctx } ;
23use std:: any:: Any ;
34use std:: borrow:: Borrow ;
45use std:: panic:: Location ;
56use std:: sync:: Arc ;
67
7- pub trait Ctx : Clone + Send { }
8-
98pub trait ExtractFootprint {
109 #[ track_caller]
1110 fn try_footprint ( & self ) -> Option < & Footprint > ;
@@ -51,9 +50,6 @@ pub enum VarArgsResult {
5150 IndexOutOfBounds ,
5251 NoVarArgs ,
5352}
54- impl < T : Ctx > Ctx for Option < T > { }
55- impl < T : Ctx + Sync > Ctx for & T { }
56- impl Ctx for ( ) { }
5753impl Ctx for Footprint { }
5854impl ExtractFootprint for ( ) {
5955 fn try_footprint ( & self ) -> Option < & Footprint > {
@@ -157,7 +153,7 @@ impl<T: CloneVarArgs + Sync> CloneVarArgs for Arc<T> {
157153}
158154
159155impl Ctx for ContextImpl < ' _ > { }
160- impl Ctx for Arc < OwnedContextImpl > { }
156+ impl ArcCtx for OwnedContextImpl { }
161157
162158impl ExtractFootprint for ContextImpl < ' _ > {
163159 fn try_footprint ( & self ) -> Option < & Footprint > {
You can’t perform that action at this time.
0 commit comments