Publish the back buffer to the front (no-op when single-buffered).
(&mut self)
| 76 | buf |
| 77 | } |
| 78 | |
| 79 | /// Replace both pixel planes from a [`plane_image`](Self::plane_image) buffer. |
| 80 | pub fn load_plane_image(&mut self, bytes: &[u8]) { |
| 81 | let split = bytes.len() / 2; |
| 82 | self.front.clear(); |
| 83 | self.front.extend_from_slice(&bytes[..split]); |
| 84 | self.back.clear(); |
| 85 | self.back.extend_from_slice(&bytes[split..]); |