[chromium] When rendering goes idle, do not count that time against frame rate
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2012 16:57:16 +0000 (16:57 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Apr 2012 16:57:16 +0000 (16:57 +0000)
commitdc205aad56099852b9c2e26ce0d87a21c6f05c12
tree5643c44a28dddf918a4736d710c46ff6cbf686c7
parent26ea11bc55a03bed1b52d27c1ba88ebf1ef74bfd
[chromium] When rendering goes idle, do not count that time against frame rate
https://bugs.webkit.org/show_bug.cgi?id=73454

The FPS counter had a few issues with its reporting. The first
3 swapbuffers are non-blocking and create FPS rates that are
unrealistically high, throwing off the moving averages and
introducing false spikes into the FPS graph. There was also no
way to monitor the smoothness of the animation, or to focus in
on a particular animation or transition.

This patch updates the FPS counter code so that bad data points
are trimmed and not graphed; so that the graph itself is taller
and more legible; so that there is a clear boundary between 40FPS
and better; and to keep statistics on frame rate between
pauses in the activity in the UI so that you can trigger a
transition and read off the average and standard deviation for
that transition to judge it smooth enough or not.

Patch by Alex Nicolaou <anicolao@chromium.org> on 2012-04-11
Reviewed by James Robinson.

HUD is not testable in webkit.

* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::CCHeadsUpDisplay):
(WebCore::CCHeadsUpDisplay::onFrameBegin):
(WebCore::CCHeadsUpDisplay::drawHudContents):
(WebCore::CCHeadsUpDisplay::drawFPSCounter):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp
Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h