[Webkit-unassigned] [Bug 99660] toggle FPS counter option

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 23 16:18:00 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=99660





--- Comment #21 from egraether at chromium.org  2012-10-23 16:19:02 PST ---
(From update of attachment 170253)
View in context: https://bugs.webkit.org/attachment.cgi?id=170253&action=review

> Source/WebCore/inspector/InspectorPageAgent.cpp:716
> +void InspectorPageAgent::syncShowFPSCounter(ErrorString* errorString, bool inParam, bool* outParam)

This method synchronizes the 'showFPSCounter' setting between inspector and compositor. It is called during the setup of the inspector. The 'inParam' is true if 'showFPSCounter' was activated with the inspector in the last session and got saved to localStorage with value 'true'.

> Source/WebCore/inspector/InspectorPageAgent.cpp:718
> +    *outParam = inParam || m_client->isShowFPSCounterFlagSet();

Setting the outParam assures that the checkbox in the inspector shows 'checked' in case 'showFPSCounter' was activated with the command-line flag.

> Source/WebCore/inspector/InspectorPageAgent.cpp:719
> +    if (*outParam)

This condition assures that fontAtlas and HUDLayer are only created when needed.

> Source/WebCore/inspector/front-end/Settings.js:60
> +    isForceCompositingModeEnabled: false

Due to remarks of reviewers the checkbox for 'showFPSCounter' now only shows up if 'force compositing mode' is enabled. This value does not change during a session and as it is loaded asynchronous I found it is the cleanest way to put it here. Please let know if there are better places.

> Source/WebKit/chromium/src/WebViewImpl.cpp:844
> +    return settingsImpl()->showFPSCounter();

At the moment I read the command-line flag from the settings of the 'WebViewImpl'. I could not find an easy way to read it from the command-line flags directly.

> Source/WebKit/chromium/src/WebViewImpl.cpp:851
> +#if USE(ACCELERATED_COMPOSITING)

This condition is here, because 'loadFontAtlas()' was declared within the same condition in 'WebViewImpl.h', so this avoids possible build breaks.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list