(&mut self, addr: u64, data: u8)
| 97 | &mut self.back |
| 98 | } else { |
| 99 | &mut self.front |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | // Fill the draw buffer with one RGBA colour (little-endian word). |
| 104 | fn fill(&mut self, color: u32) { |
| 105 | let bytes = color.to_le_bytes(); |
| 106 | for px in self.draw_buffer().chunks_exact_mut(FB_BPP) { |
| 107 | px.copy_from_slice(&bytes); |
| 108 | } |
| 109 | self.fill_count += 1; |
| 110 | if !self.double_buffered { |
| 111 | self.version += 1; |
| 112 | } |
| 113 | } |