OnPaint not called in real-time for OS-rendering

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.

OnPaint not called in real-time for OS-rendering

Postby ronag » Mon Apr 13, 2015 4:09 am

I've just tried to update to "Branch 2062" and "trunk" from "Branch 1453".

However, I'm having major performance issues where the chromium instance seems to be running at full 50fps internally but onPaint is called much slower.

I've tried:

Code: Select all
command_line->AppendSwitch("off-screen-rendering-enabled");
command_line->AppendSwitchWithValue("off-screen-frame-rate", "50");
command_line->AppendSwitch("disable-gpu");
command_line->AppendSwitch("enable-media-stream");


Without any difference.

Using:

Code: Select all
command_line->AppendSwitch("disable-gpu-compositing");


Causes an assertion error with "texture_id_".

Using

Code: Select all
command_line->AppendSwitch("enable-begin-frame-scheduling");


Doesn't render anything at all.

Any suggestions?

Here is the relevant source code, if that helps: https://gist.github.com/ronag/80fddb2fe4307d06eb27 https://gist.github.com/ronag/1ba7e36b743a5c2b218f
ronag
Techie
 
Posts: 16
Joined: Sat Sep 28, 2013 12:27 pm

Re: OnPaint not called in real-time for OS-rendering

Postby magreenblatt » Mon Apr 13, 2015 4:33 am

What OS and specific CEF version? Have you tried running the cefclient sample application with `--off-screen-rendering-enabled` and the various other flags?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: OnPaint not called in real-time for OS-rendering

Postby ronag » Mon Apr 13, 2015 5:24 am

OS: Windows 8.

CEF: trunk and 2062 from https://cefbuilds.com

I have not tried cefclient. Will do that.
ronag
Techie
 
Posts: 16
Joined: Sat Sep 28, 2013 12:27 pm

Re: OnPaint not called in real-time for OS-rendering

Postby ronag » Sun Apr 26, 2015 3:08 pm

I've been having at this for almost to weeks now without progress.

CEF client seems to run fine with just -off-screen-rendering-enabled. However, it is a bit hard to determine since there is no frame rate statistics.

Everything works in my application with the older CEF versions before Blink.

Latest version 2272 doesn't call onPaint in real-time in my application. I've tried all the flags, where enable-begin-frame-scheduling causes onPaint to never be called.

Not sure where to continue. Anyone good any advice on what might be causing this or how to debug it?
ronag
Techie
 
Posts: 16
Joined: Sat Sep 28, 2013 12:27 pm

Re: OnPaint not called in real-time for OS-rendering

Postby Cherno » Wed Apr 29, 2015 1:29 am

Hello,

I am using CEF 2272 in Windows with OSR and in order to get good and constant framerate, I had to :

- Run Cef in multithread mode (settings.multi_threaded_message_loop = 1;).
- Add command_line->AppendSwitch("disable-gpu"); in order to get the best FPS on the hardware I´m using. For some reason, if I add other switches, it goes slower, I tried many combinations.

After that, I get smooth 60FPS on machines down to i3. Usually, if you don´t get the FPS you want, it means Chrome is skipping frames. The fact that runs internally at 60 or whatever fps you ask, doesn´t mean it´s going to call the onPaint at that pace.

In order to debug, I just set settings.remote_debugging_port = 9999; and then use Chrome to start the Chrome debugging tools, where I see framerate and other really useful information.

Hope it helps
Cherno
Techie
 
Posts: 11
Joined: Thu Apr 09, 2015 5:55 am

Re: OnPaint not called in real-time for OS-rendering

Postby ronag » Fri May 01, 2015 10:08 am

Cherno wrote:Hello,

I am using CEF 2272 in Windows with OSR and in order to get good and constant framerate, I had to :

- Run Cef in multithread mode (settings.multi_threaded_message_loop = 1;).
- Add command_line->AppendSwitch("disable-gpu"); in order to get the best FPS on the hardware I´m using. For some reason, if I add other switches, it goes slower, I tried many combinations.

After that, I get smooth 60FPS on machines down to i3. Usually, if you don´t get the FPS you want, it means Chrome is skipping frames. The fact that runs internally at 60 or whatever fps you ask, doesn´t mean it´s going to call the onPaint at that pace.

In order to debug, I just set settings.remote_debugging_port = 9999; and then use Chrome to start the Chrome debugging tools, where I see framerate and other really useful information.


Tried it... Doesn't help. Chrome runs at 60 fps. However, onPaint is only called at 10 fps...
ronag
Techie
 
Posts: 16
Joined: Sat Sep 28, 2013 12:27 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 51 guests