MCPcopy Create free account
hub / github.com/DioxusLabs/anyrender / copy_texture_to_vec

Method copy_texture_to_vec

crates/wgpu_context/src/buffer_renderer.rs:121–125  ·  view source on GitHub ↗
(&self, cpu_buffer: &mut Vec<u8>)

Source from the content-addressed store, hash-verified

119 }
120
121 pub fn copy_texture_to_vec(&self, cpu_buffer: &mut Vec<u8>) {
122 cpu_buffer.clear();
123 cpu_buffer.reserve((self.config.width * self.config.height * 4) as usize);
124 self.copy_texture_to_buffer(&mut *cpu_buffer);
125 }
126
127 pub fn copy_texture_to_buffer(&self, cpu_buffer: &mut [u8]) {
128 let mut encoder = self

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected