MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / write_byte

Method write_byte

crates/virtual-machine/src/devices/framebuffer.rs:99–110  ·  view source on GitHub ↗
(&mut self, addr: u64, data: u8)

Source from the content-addressed store, hash-verified

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 }

Callers 2

write_wordMethod · 0.45

Calls 1

draw_bufferMethod · 0.80

Tested by 1