Hi! I'm working on a codebase that's using CEF to manage the UI, and am trying to drive the CEF message loop with cef_do_message_loop_work. I've set external_message_pump to true in cef_settings_t, and am calling cef_do_message_loop_work whenever on_schedule_message_pump_work requests it. I am not calling cef_do_message_loop_work intermittently on a timer - it is only getting called when CEF schedules it. I am also using windowless rendering.
However, I've been unable to get this working reliably - sometimes, I'm able to load http://www.google.com and initially navigate it, but upon resizing the window or attempting to watch a video rendering stops completely. Sometimes, the webpage doesn't even start rendering when the application initially launches. Sometimes, everything just works perfectly. The different behaviors show up at different frequencies with different machine frequencies, but but buggy behavior has been reproduced on both Windows and Linux with the same codebase. On Windows, I've noticed that enabling heap verification with Application Verifier makes buggy behavior happen more frequently.
Calling cef_do_message_loop_work intermittently fixes those issues, but doing that when work isn't available wastes user CPU time and isn't ideal. Is it possible to externally drive a CEF event loop without without resorting to calling cef_do_message_loop_work on a timer? If so, how might I be misusing CEF in a way that would cause that?
Source code exhibiting this issue is available here: https://github.com/anlumo/cef. The application is written in Rust and is using an API we're developing that wraps around CEF's C API and exposes it more conveniently in Rust. Both the "embedded" example and "embedded_wgpu" example exhibit issues, although they're more prominent in "embedded_wgpu". The examples can be run with "cd examples & cargo r --example (embedded|embedded_wgpu) --release".