Commit 38cbe16
Implement Send + Sync for LedCanvas
Since led_matrix_swap_on_vsync() will block until the next vsync,
implementing the Send + Sync traits for LedCanvas will allow the canvas
to be sent between a render thread and a draw thread. Since the
underlying canvas is created with CreateFrameCanvas(), which allocates
the canvas memory on the heap, it is safe to share between threads.1 parent 1baa92f commit 38cbe16
2 files changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
19 | 29 | | |
20 | 30 | | |
21 | 31 | | |
| |||
0 commit comments