Two newby questions

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.

Two newby questions

Postby rotolino » Wed Feb 09, 2011 9:06 am

Hello,

I'm wondering if any of _cef_browser_settings_t's flags (webgl_disabled, accelerated_compositing_disabled, etc.) can be changed to improve the performance of a web page that displays a flash game. Is there any other tweak anywhere that can help? (I'm targeting the windows platform)

Also, how can I scroll down a page programmatically? Is sending a WM_VSCROLL message enough?
Thank in advance.
rotolino
Mentor
 
Posts: 68
Joined: Sun Dec 26, 2010 10:22 am

Re: Two newby questions

Postby magreenblatt » Wed Feb 09, 2011 9:45 am

I'm wondering if any of _cef_browser_settings_t's flags (webgl_disabled, accelerated_compositing_disabled, etc.) can be changed to improve the performance of a web page that displays a flash game.

The flags you mention are related to HTML5 features. They shouldn't have an affect on Flash. Are you currently experiencing Flash-related performance problems with CEF that don't occur with Chromium?

Also, how can I scroll down a page programmatically? Is sending a WM_VSCROLL message enough?

There are plans to introduce an API for programmatic control of scrolling but it doesn't yet exist. You're likely best served by using JavaScript to scroll the window via CefFrame::ExecuteJavaScript or similar.

Regards,
Marshall
magreenblatt
Site Admin
 
Posts: 12402
Joined: Fri May 29, 2009 6:57 pm

Re: Two newby questions

Postby rotolino » Wed Feb 09, 2011 9:58 am

I can't say CEF is slower than chrome when it comes to flash, as I don't know how to measure the performance precisely; but I can say that when multi_threaded_message_loop is true I can feel the game animation is smoother, on my pc.

That's why I'm wondering whether is there any other flag I can try.
rotolino
Mentor
 
Posts: 68
Joined: Sun Dec 26, 2010 10:22 am

Re: Two newby questions

Postby magreenblatt » Wed Feb 09, 2011 10:04 am

... I can say that when multi_threaded_message_loop is true I can feel the game animation is smoother, on my pc.

Are you using an application framework like .NET, MFC, etc? Where are you calling the CefDoMessageLoopWork() function? Most likely your application is doing too much work in its message loop which is starving the browser message loop to some degree. In any case, it's perfectly fine to use |multi_threaded_message_loop| if that gives you better results.
magreenblatt
Site Admin
 
Posts: 12402
Joined: Fri May 29, 2009 6:57 pm

Re: Two newby questions

Postby rotolino » Wed Feb 09, 2011 10:15 am

It's a plain Win32 application, with no MFC/.net
When using CefDoMessageLoopWork the flash game blocks for some milliseconds every 4-5 seconds; running a separated thread works perfectly.

Thanks for replying.
rotolino
Mentor
 
Posts: 68
Joined: Sun Dec 26, 2010 10:22 am


Return to Support Forum

Who is online

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