[chromium] Enable sparkline FPS counter in threaded compositing mode
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Apr 2012 20:36:32 +0000 (20:36 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Apr 2012 20:36:32 +0000 (20:36 +0000)
commitdaa26b0e51b0eab046c95ee994769cb91c8aee7e
tree8c04c85bbb2a47c3c833d5b8631222eef73f243d
parentc5bc92f2d77de88e09f0ec8a8fdbc45526e4a81e
[chromium] Enable sparkline FPS counter in threaded compositing mode
https://bugs.webkit.org/show_bug.cgi?id=82959

Patch by James Robinson <jamesr@chromium.org> on 2012-04-03
Reviewed by Adrienne Walker.

This enables rendering the FPS counter sparkline when in threaded compositing mode. We don't currently have a
way to draw text from the thread (since we can't interact with WebCore::Font objects from a non-main thread),
but having a sparkline is still useful for judging framerate stability.

There are no tests for the HUD since it's a developer-facing feature and not user-facing.

* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::CCHeadsUpDisplay):
(WebCore):
(WebCore::CCHeadsUpDisplay::~CCHeadsUpDisplay):
(WebCore::CCHeadsUpDisplay::initializeFonts):
(WebCore::CCHeadsUpDisplay::enabled):
(WebCore::CCHeadsUpDisplay::showPlatformLayerTree):
(WebCore::CCHeadsUpDisplay::draw):
(WebCore::CCHeadsUpDisplay::drawHudContents):
(WebCore::CCHeadsUpDisplay::drawFPSCounter):
(WebCore::CCHeadsUpDisplay::drawFPSCounterText):
(WebCore::CCHeadsUpDisplay::drawPlatformLayerTree):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
(CCHeadsUpDisplay):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::initialize):

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