summaryrefslogtreecommitdiffstats
path: root/cc/heads_up_display_layer_impl.h
diff options
context:
space:
mode:
authoregraether@chromium.org <egraether@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-05 21:48:15 +0000
committeregraether@chromium.org <egraether@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-05 21:48:15 +0000
commitaf97816e82e643e37c69656f55b9cfd12ba72eec (patch)
treef5157391530df0862bde3481fbc1775179784da8 /cc/heads_up_display_layer_impl.h
parent89e711aa9c8dc7e38e7e1712c9598cf9391ad800 (diff)
downloadchromium_src-af97816e82e643e37c69656f55b9cfd12ba72eec.zip
chromium_src-af97816e82e643e37c69656f55b9cfd12ba72eec.tar.gz
chromium_src-af97816e82e643e37c69656f55b9cfd12ba72eec.tar.bz2
this change improves the following points of the FPS counter:
-cleaner design: less colors, text arranged above the graph, deviation number right aligned -added transparency: FPS counter does not completely cover the webpage -less frequent number updates: makes the numbers easier to read -indicator line at 60fps comparison images: https://docs.google.com/folder/d/0B8Y78t3tjy1XZk1xdWx6VjN5aFE/edit Please download the patch and provide a screenshot from your system to test the layout. Review URL: https://chromiumcodereview.appspot.com/11272042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166041 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/heads_up_display_layer_impl.h')
-rw-r--r--cc/heads_up_display_layer_impl.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/cc/heads_up_display_layer_impl.h b/cc/heads_up_display_layer_impl.h
index bcca767..3276293 100644
--- a/cc/heads_up_display_layer_impl.h
+++ b/cc/heads_up_display_layer_impl.h
@@ -6,12 +6,15 @@
#define CC_HEADS_UP_DISPLAY_LAYER_IMPL_H_
#include "base/memory/scoped_ptr.h"
+#include "base/time.h"
#include "cc/cc_export.h"
#include "cc/font_atlas.h"
#include "cc/layer_impl.h"
#include "cc/scoped_texture.h"
class SkCanvas;
+class SkPaint;
+struct SkRect;
namespace cc {
@@ -44,13 +47,19 @@ private:
virtual const char* layerTypeAsString() const OVERRIDE;
void drawHudContents(SkCanvas*);
- void drawFPSCounter(SkCanvas*, FrameRateCounter*, int top, int height);
- void drawFPSCounterText(SkCanvas*, FrameRateCounter*, int top, int width, int height);
+ int drawFPSCounter(SkCanvas*, FrameRateCounter*);
+ void drawFPSCounterText(SkCanvas*, SkPaint&, FrameRateCounter*, SkRect);
+ void drawFPSCounterGraph(SkCanvas*, SkPaint&, FrameRateCounter*, SkRect);
void drawDebugRects(SkCanvas*, DebugRectHistory*);
scoped_ptr<FontAtlas> m_fontAtlas;
scoped_ptr<ScopedTexture> m_hudTexture;
scoped_ptr<SkCanvas> m_hudCanvas;
+
+ double m_averageFPS;
+ double m_stdDeviation;
+
+ base::TimeTicks textUpdateTime;
};
} // namespace cc