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

Side by Side Diff: cc/heads_up_display_layer_impl.h

Issue 12149004: [cc] Show GPU memory usage and overage below FPS counter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/cc.gyp ('k') | cc/heads_up_display_layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_HEADS_UP_DISPLAY_LAYER_IMPL_H_ 5 #ifndef CC_HEADS_UP_DISPLAY_LAYER_IMPL_H_
6 #define CC_HEADS_UP_DISPLAY_LAYER_IMPL_H_ 6 #define CC_HEADS_UP_DISPLAY_LAYER_IMPL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "cc/cc_export.h" 10 #include "cc/cc_export.h"
11 #include "cc/font_atlas.h" 11 #include "cc/font_atlas.h"
12 #include "cc/layer_impl.h" 12 #include "cc/layer_impl.h"
13 #include "cc/scoped_resource.h" 13 #include "cc/scoped_resource.h"
14 14
15 class SkCanvas; 15 class SkCanvas;
16 class SkPaint; 16 class SkPaint;
17 struct SkRect; 17 struct SkRect;
18 18
19 namespace cc { 19 namespace cc {
20 20
21 class DebugRectHistory; 21 class DebugRectHistory;
22 class FontAtlas; 22 class FontAtlas;
23 class FrameRateCounter; 23 class FrameRateCounter;
24 class MemoryHistory;
24 class PaintTimeCounter; 25 class PaintTimeCounter;
25 26
26 class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl { 27 class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl {
27 public: 28 public:
28 static scoped_ptr<HeadsUpDisplayLayerImpl> create(LayerTreeImpl* treeImpl, i nt id) 29 static scoped_ptr<HeadsUpDisplayLayerImpl> create(LayerTreeImpl* treeImpl, i nt id)
29 { 30 {
30 return make_scoped_ptr(new HeadsUpDisplayLayerImpl(treeImpl, id)); 31 return make_scoped_ptr(new HeadsUpDisplayLayerImpl(treeImpl, id));
31 } 32 }
32 virtual ~HeadsUpDisplayLayerImpl(); 33 virtual ~HeadsUpDisplayLayerImpl();
33 34
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 69
69 void drawHudContents(SkCanvas*); 70 void drawHudContents(SkCanvas*);
70 71
71 void drawTextLeftAligned(SkCanvas*, SkPaint*, const SkRect& bounds, const st d::string& text); 72 void drawTextLeftAligned(SkCanvas*, SkPaint*, const SkRect& bounds, const st d::string& text);
72 void drawTextRightAligned(SkCanvas*, SkPaint*, const SkRect& bounds, const s td::string& text); 73 void drawTextRightAligned(SkCanvas*, SkPaint*, const SkRect& bounds, const s td::string& text);
73 74
74 void drawGraphBackground(SkCanvas*, SkPaint*, const SkRect& bounds); 75 void drawGraphBackground(SkCanvas*, SkPaint*, const SkRect& bounds);
75 void drawGraphLines(SkCanvas*, SkPaint*, const SkRect& bounds, const Graph&) ; 76 void drawGraphLines(SkCanvas*, SkPaint*, const SkRect& bounds, const Graph&) ;
76 77
77 int drawFPSDisplay(SkCanvas*, FrameRateCounter*, const int& top); 78 int drawFPSDisplay(SkCanvas*, FrameRateCounter*, const int& top);
79 int drawMemoryDisplay(SkCanvas*, MemoryHistory*, const int& top);
78 int drawPaintTimeDisplay(SkCanvas*, PaintTimeCounter*, const int& top); 80 int drawPaintTimeDisplay(SkCanvas*, PaintTimeCounter*, const int& top);
79 81
80 void drawDebugRects(SkCanvas*, DebugRectHistory*); 82 void drawDebugRects(SkCanvas*, DebugRectHistory*);
81 83
82 scoped_ptr<FontAtlas> m_fontAtlas; 84 scoped_ptr<FontAtlas> m_fontAtlas;
83 scoped_ptr<ScopedResource> m_hudTexture; 85 scoped_ptr<ScopedResource> m_hudTexture;
84 scoped_ptr<SkCanvas> m_hudCanvas; 86 scoped_ptr<SkCanvas> m_hudCanvas;
85 87
86 Graph m_fpsGraph; 88 Graph m_fpsGraph;
87 Graph m_paintTimeGraph; 89 Graph m_paintTimeGraph;
88 90
89 base::TimeTicks m_timeOfLastGraphUpdate; 91 base::TimeTicks m_timeOfLastGraphUpdate;
90 }; 92 };
91 93
92 } // namespace cc 94 } // namespace cc
93 95
94 #endif // CC_HEADS_UP_DISPLAY_LAYER_IMPL_H_ 96 #endif // CC_HEADS_UP_DISPLAY_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/heads_up_display_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698