Page 1 of 1

onPaint-like callback for other native views

PostPosted: Thu Jul 09, 2020 2:03 pm
by shannah
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?

Re: onPaint-like callback for other native views

PostPosted: Thu Jul 09, 2020 3:13 pm
by Czarek
On Mac there is cacheDisplay function, on Linux XGetImage and on Windows PrintWindow.

Re: onPaint-like callback for other native views

PostPosted: Thu Jul 09, 2020 4:36 pm
by shannah
Thanks for the tips. Do you know if these are performant enough to to get 30-60fps on a desktop?