CEF RenderHandler.OnPaint w/ windowed browser

190 views
Skip to first unread message

joseph...@gmail.com

unread,
Oct 5, 2018, 2:05:10 PM10/5/18
to CEF Python
Hi Czarek,

I'm working on an application that uses cefpython in windowed mode, that is, without offscreen rendering. I need an event handler to be dispatched when a new frame is drawn by the browser, but it seems the RenderHandler.OnPaint callback doesn't work in windowed mode.

Is there any other way to get this event with CEF/cefpython?

I'm also currently exploring using X11's DAMAGE extension, but it doesn't seem to do what I want at the moment.

Thanks,
Joe

Czarek Tomczak

unread,
Oct 5, 2018, 2:42:44 PM10/5/18
to CEF Python
RenderHandler is for off-screen rendering only. Maybe window.performance "paint" event will work for you? See https://developer.mozilla.org/en-US/docs/Web/API/PerformancePaintTiming .

joseph...@gmail.com

unread,
Oct 5, 2018, 7:08:24 PM10/5/18
to CEF Python
Hmm. This seemed promising at first, but after looking at it, I don't think this will fit my needs.

For a little context, I have a Linux application that uses CEF. I've written a compositing window manager that redirects the CEF window to a pixmap, then binds that pixmap to a texture. The texture is rendered to the screen.

Currently, the texture is rendered at 60 FPS, regardless of whether or not the browser has drawn anything, and this uses a lot of the GPU. I'm looking for an event from the browser to signal that something has been painted, so that I can redraw the texture in my compositor.

joseph...@gmail.com

unread,
Oct 5, 2018, 7:10:56 PM10/5/18
to CEF Python
This is sort of a Linux specific equivalent to CEF's issue #1006 [1]. It allows the browser window contents to be rendered to a texture without expensive blitting, using GLX_EXT_texture_from_pixmap for zero copy pixmap binding to a texture.

[1] https://bitbucket.org/chromiumembedded/cef/issues/1006/cef3-support-rendering-to-a-hardware-gl

Czarek Tomczak

unread,
Oct 5, 2018, 10:13:26 PM10/5/18
to CEF Python
Try asking on the CEF Forum about your issue.
Reply all
Reply to author
Forward
0 new messages