CefSharp icon indicating copy to clipboard operation
CefSharp copied to clipboard

How to wait for render completed?

Open Bodekaer opened this issue 11 years ago • 23 comments

We're having a small challenge, where we would like to know when a CEF render has been completed. Do you have any recommendations on this?

E.g. I'm hoping for something like an event that's raised after each render update is completed:

 browser.RenderCompleted += () .... ;
 browser.ExecuteScriptAsync('document.body.innerHTML = ...);

Any tips?

Bodekaer avatar Feb 15 '15 10:02 Bodekaer

Yes, but how to clear the image then?

All the best,

Michael Bodekaer

On Mon, Mar 2, 2015 at 5:05 PM -0800, "Alex Maitland" [email protected] wrote:

Override InteropBitmapInfo.Invalidate()?

https://github.com/cefsharp/CefSharp/blob/master/CefSharp.Wpf/Rendering/InteropBitmapInfo.cs#L32

— Reply to this email directly or view it on GitHub.

Bodekaer avatar Mar 03 '15 01:03 Bodekaer

Not sure.

Did you try the WritableBitmapInfo? It should only invalidate the dirty area, might give a cleaner refresh.

amaitland avatar Mar 03 '15 01:03 amaitland

I've similar I think situation as topic starter but with some variations. WPF with offscreen mode, in browser 3D model in WebGL. After each frame rendered I must set in WPF 2D billboard on some 3D point projection. I get 2D coords from jscript callback and in browser onRender set 2D object by this coords. When I pan model visually 2D objects moved on 1-2 frame before the same point moved in 3D. Question the same - how know when current browser frame not only rendered but also painted in WPF? Thanks

mortalV avatar May 07 '15 09:05 mortalV