make Meshes cheaply cloneable by using Arc<[T]> in iced_graphics::mesh::Indexed
This commit is contained in:
parent
39ca9e0233
commit
42bc4af972
3 changed files with 14 additions and 10 deletions
|
|
@ -547,8 +547,8 @@ impl BufferStack {
|
|||
Buffer::Solid(buffer) if !buffer.indices.is_empty() => {
|
||||
Some(Mesh::Solid {
|
||||
buffers: mesh::Indexed {
|
||||
vertices: buffer.vertices,
|
||||
indices: buffer.indices,
|
||||
vertices: buffer.vertices.into(),
|
||||
indices: buffer.indices.into(),
|
||||
},
|
||||
clip_bounds,
|
||||
transformation: Transformation::IDENTITY,
|
||||
|
|
@ -557,8 +557,8 @@ impl BufferStack {
|
|||
Buffer::Gradient(buffer) if !buffer.indices.is_empty() => {
|
||||
Some(Mesh::Gradient {
|
||||
buffers: mesh::Indexed {
|
||||
vertices: buffer.vertices,
|
||||
indices: buffer.indices,
|
||||
vertices: buffer.vertices.into(),
|
||||
indices: buffer.indices.into(),
|
||||
},
|
||||
clip_bounds,
|
||||
transformation: Transformation::IDENTITY,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue