Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a keyboard shortcut to show or hide 'FPS meter' in Chromium versions 60+?

Analyzing an HTML-5 application which makes heavy use of GPU-enabled animations, I would like to constantly check the FPS rate in an environment in which Chrome/Chromium is started with the --kiosk startup flag. Currently, I use Chromium in version 60+.

Most of us know how to en- or disable this feature in Chrome/Chromium by selecting the checkbox FPS meter in regular mode (see: [1], [2]). I already found the startup flag --show-fps-counter which shows the GPU debug box upon startup [3]. However, the official developer documentation provided by Google does not mention ways to use a keyboard shortcut to toggle the display of the FPS meter tool.

So my question is:

  1. Is there an (un-)official keyboard shortcut to show/hide the FPS meter when Chrome/Chromium is launched in --kiosk mode? If so: what is it?

Questions which I already checked/screened and which did not provide a useful answers:

  • [4], refers to an outdated Chrome version (v33),
  • [5], refers to Android settop boxes and, as of today, has no answer,
  • [6], refers to JavaScript and a programmatic activation of the FPS meter (again: no answer).

Any suggestions based on official sources are much appreciated.

like image 363
MWiesner Avatar asked Jan 07 '18 11:01

MWiesner


People also ask

How do I turn on my FPS counter in Chrome?

To open the FPS meter, you can go into the Chrome Developer Tools (Ctrl+Shift+I), then open the command menu (Ctrl+Shift+P), type 'show frame,' and press enter as shown below.

How do you show FPS on screen?

Press the Windows logo key + G to open up the Game Bar, select the Overlay menu, and then the Performance tab. Select the FPS tab in the Performance tab, then click on the Request Access button.

What is FPS overlay?

FPS Monitor tracks your PC's hardware state and displays this information as an overlay in-game. You no longer need to switch to desktop or attach a second display to control your hardware status.


2 Answers

The FPS counter, being part of the DevTools, can be toggled programmatically over the Chrome DevTools Protocol (CDP). An example using Puppeteer is available here on the Google Developers site.

So a clumsy but working solution would be writing a script that toggles the FPS counter over CDP, and assign a hotkey to it in your OS. You might want to check the awesome-devtools repo to choose a CDP client in your favorite language.

like image 95
Arnie97 Avatar answered Sep 29 '22 20:09

Arnie97


maybe this solution is useful for you , first download an extension called FPS extension then in extensions panel go to keyboard shortcuts and add a shortcut for this extension, this way you can turn it on and off when ever you want. hope it helps

like image 33
Ehsan Kiani Avatar answered Sep 29 '22 20:09

Ehsan Kiani