off-screen render event

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.

off-screen render event

Postby Jonas » Mon Jul 03, 2017 2:34 pm

Is there a way to synchronize the process of updating the DOM and capturing a screenshot? I want to capture the screenshot immediately after the updated webpage is rendered in memory.
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: off-screen render event

Postby Czarek » Wed Jul 05, 2017 12:49 pm

Not clear what you're asking for. You want some callback in the Renderer process?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: off-screen render event

Postby Jonas » Wed Jul 05, 2017 1:05 pm

I think so -- I think I need a callback to the rendering process.

I am updating the DOM and then saving the rendered off-screen buffer data to disk (as a test). My issue is that when I save the buffer it does not always reflect the latest DOM update. I'm guessing this is because Chromium renders in a separate thread. Probably what this requires is an event that gets called by the rendering thread when it completes so that my main thread knows the buffer is has been rendered with the updated DOM and is ready to be used.

My eventual goal is to write the rendered data to a video I/O card. So, I would need to update the DOM and get a signal that it has been rendered to the off-screen buffer all within 16.6 milliseconds.
Jonas
Techie
 
Posts: 39
Joined: Thu Jul 10, 2014 2:23 pm

Re: off-screen render event

Postby magreenblatt » Wed Jul 05, 2017 1:17 pm

The short answer is that it's not possible without significant code changes in Chromium/Blink. You would basically need to remove the existing compositing scheduler and implement your own mechanism for scheduling paint events and merging invalidated regions (potentially generated from different renderer processes). See https://www.chromium.org/developers/des ... -in-chrome for background.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Majestic-12 [Bot] and 86 guests