Hello, I use softbuffer to draw my window..
I have this code:
let mut buffer = surface.buffer_mut().unwrap();
let pixels = canvas.data();
for (dst, src) in buffer.iter_mut().zip(pixels.chunks_exact(4)) {
*dst = (src[0] as u32) << 16 | (src[1] as u32) << 8 | (src[2] as u32);
}
if let Err(e) = buffer.present() {
println!("Error: {:?}", e);
}
When I send the data pack to X11 server, and screen size is more than 16MB, the program will crash!
it's output like:
Error: PlatformError(Some("Failed to draw image to window"), Some(X11(ConnectionError(MaximumRequestLengthExceeded))))
can you help me to solve it?
Hello, I use softbuffer to draw my window..
I have this code:
When I send the data pack to X11 server, and screen size is more than 16MB, the program will crash!
it's output like:
can you help me to solve it?