mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-07-18 21:25:01 +00:00
Bezier-rs: Fix crash when outlining a small bézier (#1958)
Fix crash when outlining small bézier
This commit is contained in:
parent
9524835a30
commit
bf5019db7b
2 changed files with 42 additions and 8 deletions
|
@ -164,14 +164,12 @@ async fn execute_shader<I: Pod + Send + Sync, O: Pod + Send + Sync>(device: Arc<
|
|||
// Since contents are got in bytes, this converts these bytes back to u32
|
||||
let result = bytemuck::cast_slice(&data).to_vec();
|
||||
|
||||
// With the current interface, we have to make sure all mapped views are
|
||||
// dropped before we unmap the buffer.
|
||||
// With the current interface, we have to make sure all mapped views are dropped before we unmap the buffer
|
||||
drop(data);
|
||||
staging_buffer.unmap(); // Unmaps buffer from memory
|
||||
// If you are familiar with C++ these 2 lines can be thought of similarly to:
|
||||
// delete myPointer;
|
||||
// myPointer = NULL;
|
||||
// It effectively frees the memory
|
||||
// Unmaps buffer from memory
|
||||
staging_buffer.unmap();
|
||||
// If you are familiar with C++ these 2 lines can be thought of similarly to `delete myPointer; myPointer = NULL;`.
|
||||
// It effectively frees the memory.
|
||||
|
||||
// Returns data from buffer
|
||||
Some(result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue