I manually pump the renderer by using `CefDoMessageLoopWork()' at a regular rate, and I use it in conjunction with SendExternalEventFrame() - I have my own event loop.
Again, the difficulty I'm having is how to marry the OnPaint() with the corresponding OnProcessMessageReceived(). These are the biggest issues that I'm experiencing:
- When the page is first loaded by CEF, I suspect that I may receive multiple OnPaint()'s before receiving first OnProcessMessageReceived()?
- I observe situations where there is a cadence of 2 x OnPaint() followed by 2 x OnProcessMessageReceived() or sometimes situations where OnPaint() will be ahead of OnProcessMessageReceived().
- Receive multiple OnProcessMessageReceived() without any OnPaint(). I appreciate that I won't receive an OnPaint() if there are no visual updates (an optimisation); however, I still need to correlate any generated OnPaint()'s with the corresponding OnProcessMessageReceived().
It's not any particular bullet point above that is the problem, but rather the combination of these issues. In summary (and fundamentally), I need to somehow correlate the OnPaint() with OnProcessMessageReceived().
Features we use:
- OSR (windowless_rendering_enabled=1)
- No Multithreaded Msg Loop (multi_threaded_message_loop=0).
- Custom event loop (libevent2).
- external_begin_frame_enabled=1/SendExternalBeginFrame().
Ubuntu 20.04 64-bit
CEF v85.3.11