diff options
author | egraether@chromium.org <egraether@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 23:34:55 +0000 |
---|---|---|
committer | egraether@chromium.org <egraether@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 23:34:55 +0000 |
commit | 2065bce60e9fefa0a0325c6467e8c6b543f1a294 (patch) | |
tree | f5c0f1a546e661f15942d232afcd1571856ef675 /cc/heads_up_display_layer.cc | |
parent | f89f563c49877af2093975735c2abf6a56d1a1e5 (diff) | |
download | chromium_src-2065bce60e9fefa0a0325c6467e8c6b543f1a294.zip chromium_src-2065bce60e9fefa0a0325c6467e8c6b543f1a294.tar.gz chromium_src-2065bce60e9fefa0a0325c6467e8c6b543f1a294.tar.bz2 |
improving UI of FPS counter
The FPS counter shows the frame rate based on a time-stamp history and is located in the compositor's HUDLayer.
This change includes:
- moving to top right corner
- plotting the graph's X-axis based on time between frames
- measuring min/max value instead of standard deviation
- showing histogram of time spent in each value
- scaling to the max value in case of very high fps (disabled vsync)
comparison images:
https://docs.google.com/folder/d/0B8Y78t3tjy1XTC1OYzUySFgwODQ/edit
Review URL: https://chromiumcodereview.appspot.com/11369200
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167765 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/heads_up_display_layer.cc')
-rw-r--r-- | cc/heads_up_display_layer.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cc/heads_up_display_layer.cc b/cc/heads_up_display_layer.cc index 7cd8b4a..ef11dee 100644 --- a/cc/heads_up_display_layer.cc +++ b/cc/heads_up_display_layer.cc @@ -32,15 +32,20 @@ void HeadsUpDisplayLayer::update(ResourceUpdateQueue&, const OcclusionTracker*, int maxTextureSize = layerTreeHost()->rendererCapabilities().maxTextureSize; gfx::Size bounds; + WebKit::WebTransformationMatrix matrix; + matrix.makeIdentity(); + if (settings.showPlatformLayerTree || settings.showDebugRects()) { int width = std::min(maxTextureSize, layerTreeHost()->deviceViewportSize().width()); int height = std::min(maxTextureSize, layerTreeHost()->deviceViewportSize().height()); bounds = gfx::Size(width, height); } else { bounds = gfx::Size(256, 128); + matrix.translate(layerTreeHost()->deviceViewportSize().width() - 256, 0); } setBounds(bounds); + setTransform(matrix); } bool HeadsUpDisplayLayer::drawsContent() const |