onPaint-like callback for other native views

Discussion of current events and participation in intelligent conversation with other CEF users.

onPaint-like callback for other native views

Postby shannah » Thu Jul 09, 2020 2:03 pm

This isn't directly related to CEF, but I'm starting here because the expertise might exist here. I really like the CEF onPaint() callback - it makes it easy to integrate CEF into any UI kit (providing a pixel buffer and dirty regions) that I can easily transfer to whatever UI kit I'm using.

Is there an equivalent or callback for other native widgets (e.g. NSView on Mac) that would allow me to pipe out the native view's pixels in real time. I know that ever platform has a way to render widgets to an image, but this is generally slow... I'm curios if they provide a performant callback like the onPaint() callback that CEF provides?
shannah
Techie
 
Posts: 30
Joined: Wed Jul 08, 2020 8:01 am

Re: onPaint-like callback for other native views

Postby Czarek » Thu Jul 09, 2020 3:13 pm

On Mac there is cacheDisplay function, on Linux XGetImage and on Windows PrintWindow.
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: onPaint-like callback for other native views

Postby shannah » Thu Jul 09, 2020 4:36 pm

Thanks for the tips. Do you know if these are performant enough to to get 30-60fps on a desktop?
shannah
Techie
 
Posts: 30
Joined: Wed Jul 08, 2020 8:01 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 12 guests