From b74e7e7353d69ffb54cf0c0f0574ea7abf0f3a68 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez <hector0193@gmail.com> Date: Sat, 7 Mar 2020 23:45:54 +0100 Subject: Implement `Primitive::Cached` --- examples/bezier_tool/src/main.rs | 5 ++--- examples/geometry/src/main.rs | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/bezier_tool/src/main.rs b/examples/bezier_tool/src/main.rs index 023eb0f7..c3fbf276 100644 --- a/examples/bezier_tool/src/main.rs +++ b/examples/bezier_tool/src/main.rs @@ -23,7 +23,6 @@ mod bezier { basic_shapes, BuffersBuilder, StrokeAttributes, StrokeOptions, StrokeTessellator, VertexBuffers, }; - use std::sync::Arc; pub struct Bezier<'a, Message> { state: &'a mut State, @@ -175,10 +174,10 @@ mod bezier { let mesh = Primitive::Mesh2D { origin: Point::new(bounds.x, bounds.y), - buffers: Arc::new(Mesh2D { + buffers: Mesh2D { vertices: buffer.vertices, indices: buffer.indices, - }), + }, }; ( diff --git a/examples/geometry/src/main.rs b/examples/geometry/src/main.rs index 795c6a71..13a687ab 100644 --- a/examples/geometry/src/main.rs +++ b/examples/geometry/src/main.rs @@ -87,7 +87,7 @@ mod rainbow { ( Primitive::Mesh2D { origin: Point::new(b.x, b.y), - buffers: std::sync::Arc::new(Mesh2D { + buffers: Mesh2D { vertices: vec![ Vertex2D { position: posn_center, @@ -136,7 +136,7 @@ mod rainbow { 0, 7, 8, // BL 0, 8, 1, // L ], - }), + }, }, MouseCursor::OutOfBounds, ) -- cgit