Enabling GPU Paint

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.

Enabling GPU Paint

Postby aero » Thu Mar 18, 2021 8:54 pm

How do enable Chromium/CEF to compose the UI using the GPU AKA using OnAcceleratedPaint rather than OnPaint?

Things I've tried:
CefSettings: windowless_rendering_enabled
CefWindowInfo: windowless_rendering_enabled, shared_texture_enabled, external_begin_frame_enabled

I've also tried the following command line switches:
off-screen-rendering-enabled
shared-texture-enabled
enable-gpu

Every time I go to run, render_handler_cpptoc.cc is calling render_handler_on_paint calling OnPaint... how do I get it to call render_handler_on_accelerated_paint OnAcceleratedPaint?
Did I miss a setting or do I need to extend some an additional interface in CefRenderHandler or others? My code seemed to be fine with older versions of CEF.

I hope the solution isn't use PR "Reimplement shared texture support for viz OSR" :cry:
Last edited by aero on Thu Mar 18, 2021 9:04 pm, edited 1 time in total.
aero
Newbie
 
Posts: 4
Joined: Tue Feb 09, 2021 3:45 pm

Re: Enabling GPU Paint

Postby amaitland » Thu Mar 18, 2021 8:57 pm

Not currently implemented.

You'll need to build a custom version from source and apply https://bitbucket.org/chromiumembedded/ ... quests/285
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1291
Joined: Wed Jan 14, 2015 2:35 am

Re: Enabling GPU Paint

Postby aero » Thu Mar 18, 2021 9:06 pm

I was afraid of that. Are there any binaries of this branch? Chromium seems difficult to build. Any ETA for merge other than 'when its done'? :)
Also was there a point in which this feature was working in the main branch?
aero
Newbie
 
Posts: 4
Joined: Tue Feb 09, 2021 3:45 pm

Re: Enabling GPU Paint

Postby amaitland » Thu Mar 18, 2021 9:20 pm

No official binaries, maybe someone who's comment on the PR can help.

No idea if/when it'll be merged. Not up to me.

I don't remember the last version to include support, you'll have to review the links and comments to find which was the last version to include. There is no support for older branches so it's not something I'd recommend.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1291
Joined: Wed Jan 14, 2015 2:35 am

Re: Enabling GPU Paint

Postby aero » Fri Mar 19, 2021 4:44 pm

A bit confused here..
I see the following stack trace in cefclient with --off-screen-rendering-enabled:

OsrRenderer::Render (also OsrRenderer::OnPaint)
OsrRenderHandlerWinGL::OnPaint
OsrWindowWin::OnPaint
ClientHandlerOsr::OnPaint
render_handler_cpptoc.c : render_handler_on_paint

OsrRenderHandlerWinGL::OnPaint has a parameter const void* buffer. This OnPaint calls OsrRenderer renderer_ .OnPaint() and .Render()

In OsrRenderer::OnPaint OsrRenderer::Render() I see OGL calls.

Is this not GPU painting? How is it different from OnAccerlatedPaint?
Is buffer not the texture buffer? Can't I use this for my own Present?
Who is calling Present once this UI painting is done?
aero
Newbie
 
Posts: 4
Joined: Tue Feb 09, 2021 3:45 pm

Re: Enabling GPU Paint

Postby amaitland » Sun Mar 21, 2021 11:19 pm

OnPaint the buffer contains a bitmap.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1291
Joined: Wed Jan 14, 2015 2:35 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 36 guests