Is there a way to change browser FPS from 60 to 30?

1,491 views
Skip to first unread message

Site Mao

unread,
Apr 21, 2015, 5:49:47 PM4/21/15
to chromi...@chromium.org
Interested in doing this for testing reasons on chrome shell.

I've attempted just a few things:

I've tried adjusting the default value of renderer_settings.cc, tried modifying the interval in begin_frame_source.cc, I've tried modifying kDefaultRefreshRate in compositor.cc, and I've tried adjusting the DefaultInterval() inside begin_frame_args.cc.

In addition, I've also tried modifying VSyncMonitor.java to skip half the "doFrame()"s. This breaks the renderer and I need to do some investigation into what is going on.

Has anybody tried this before? Does anybody have a working way to adjust the FPS?

Dana Jansens

unread,
Apr 21, 2015, 6:02:08 PM4/21/15
to site.m...@gmail.com, brian...@chromium.org, chromium-dev
+brianderson would know

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Brian C. Anderson

unread,
Apr 21, 2015, 7:09:07 PM4/21/15
to Dana Jansens, site.m...@gmail.com, chromium-dev
I put together a hacky patch, which should work on all platforms, and verified it on my local machine:

It does the following:
1) Add begin_frame_count_ to cc::Scheduler
2) If !Scheduler::settings_::main_thread_should_always_be_low_latency, then...
3) Increment begin_frame_count_ at the start of Scheduler::OnBeginFrameMixInDelegate and use it to skip some frames by returning early.

Scheduler::settings_::main_thread_should_always_be_low_latency being false is an indirect way of detecting if you are in the Renderer.

Site Mao

unread,
Apr 22, 2015, 7:51:35 PM4/22/15
to chromi...@chromium.org, dan...@chromium.org, site.m...@gmail.com
Hi Brian.

Thanks for the patch. It worked for me.
Reply all
Reply to author
Forward
0 new messages