Calling SendExternalBeginFrame

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Calling SendExternalBeginFrame

Postby danmontz » Fri Apr 16, 2021 5:25 pm

When is the correct time to start calling SendExternalBeginFrame from the CEF app?

My first attempt was in the CefLifeSpanHandler::OnAfterCreate; however, staring at traces for hours on end, I determined that this was too early. It was causing the Compositor's state machine to change the deadline mode from LATE to IMMEDIATE to deal with 'main thread missed last deadline' condition. When the IMMEDIATE deadline mode was used, I saw a missed or repeat frame.

From what I could tell, while the frame is loading, BeginFrames aren't necessary. They were forwarded to GPU but not on to the renderer. This was apparent by watching the event flow through the Graphics.Pipeline trace.

So, I changed where my application calls SendExternalBeginFrame to CefLoadHandler::OnLoadComplete. In this case the Compositor state machine looks a lot less chaotic and seems to quickly fall into a nice clean cadence.

I have grepped through the cef/chromium source code as part of my investigation, but didn't see any obvious comments/recommendations for when to start calling SendExternalBeginFrame.

Thanks in advance,
Dan
danmontz
Techie
 
Posts: 28
Joined: Thu Apr 13, 2017 4:11 pm

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 38 guests