Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: cc/heads_up_display_layer_impl.h

Issue 11272042: improvements of the FPS counter in the HUDLayer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: updated patch, isBadFrameInterval fix, adapted graph drawing range Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/heads_up_display_layer_impl.h
diff --git a/cc/heads_up_display_layer_impl.h b/cc/heads_up_display_layer_impl.h
index b17644a38508db3dc3443adfa6a9c9f9d670363a..b4b9d43a6969e54e766214b52e3b9e1dbb0f914f 100644
--- a/cc/heads_up_display_layer_impl.h
+++ b/cc/heads_up_display_layer_impl.h
@@ -6,11 +6,14 @@
#define CCHeadsUpDisplayLayerImpl_h
#include "base/memory/scoped_ptr.h"
+#include "base/time.h"
#include "cc/font_atlas.h"
#include "cc/layer_impl.h"
#include "cc/scoped_texture.h"
class SkCanvas;
+class SkPaint;
+class SkRect;
namespace cc {
@@ -43,13 +46,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

Powered by Google App Engine
This is Rietveld 408576698