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

Side by Side Diff: cc/heads_up_display_layer_impl.h

Issue 12212099: cc: remove FontAtlas (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 182043 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
« no previous file with comments | « cc/heads_up_display_layer.cc ('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"
12 #include "cc/layer_impl.h" 11 #include "cc/layer_impl.h"
13 #include "cc/scoped_resource.h" 12 #include "cc/scoped_resource.h"
14 13
15 class SkCanvas; 14 class SkCanvas;
16 class SkPaint; 15 class SkPaint;
17 class SkTypeface; 16 class SkTypeface;
18 struct SkRect; 17 struct SkRect;
19 18
20 namespace cc { 19 namespace cc {
21 20
22 class DebugRectHistory; 21 class DebugRectHistory;
23 class FontAtlas;
24 class FrameRateCounter; 22 class FrameRateCounter;
25 class MemoryHistory; 23 class MemoryHistory;
26 class PaintTimeCounter; 24 class PaintTimeCounter;
27 25
28 class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl { 26 class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl {
29 public: 27 public:
30 static scoped_ptr<HeadsUpDisplayLayerImpl> create(LayerTreeImpl* treeImpl, i nt id) 28 static scoped_ptr<HeadsUpDisplayLayerImpl> create(LayerTreeImpl* treeImpl, i nt id)
31 { 29 {
32 return make_scoped_ptr(new HeadsUpDisplayLayerImpl(treeImpl, id)); 30 return make_scoped_ptr(new HeadsUpDisplayLayerImpl(treeImpl, id));
33 } 31 }
34 virtual ~HeadsUpDisplayLayerImpl(); 32 virtual ~HeadsUpDisplayLayerImpl();
35 33
36 void setFontAtlas(scoped_ptr<FontAtlas>);
37
38 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl) OVERR IDE; 34 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl) OVERR IDE;
39 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE;
40 35
41 virtual void willDraw(ResourceProvider*) OVERRIDE; 36 virtual void willDraw(ResourceProvider*) OVERRIDE;
42 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE; 37 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE;
43 void updateHudTexture(ResourceProvider*); 38 void updateHudTexture(ResourceProvider*);
44 virtual void didDraw(ResourceProvider*) OVERRIDE; 39 virtual void didDraw(ResourceProvider*) OVERRIDE;
45 40
46 virtual void didLoseOutputSurface() OVERRIDE; 41 virtual void didLoseOutputSurface() OVERRIDE;
47 42
48 virtual bool layerIsAlwaysDamaged() const OVERRIDE; 43 virtual bool layerIsAlwaysDamaged() const OVERRIDE;
49 44
(...skipping 25 matching lines...) Expand all
75 void drawGraphBackground(SkCanvas*, SkPaint*, const SkRect& bounds); 70 void drawGraphBackground(SkCanvas*, SkPaint*, const SkRect& bounds);
76 void drawGraphLines(SkCanvas*, SkPaint*, const SkRect& bounds, const Graph&) ; 71 void drawGraphLines(SkCanvas*, SkPaint*, const SkRect& bounds, const Graph&) ;
77 72
78 void drawPlaformLayerTree(SkCanvas*); 73 void drawPlaformLayerTree(SkCanvas*);
79 int drawFPSDisplay(SkCanvas*, FrameRateCounter*, const int& top); 74 int drawFPSDisplay(SkCanvas*, FrameRateCounter*, const int& top);
80 int drawMemoryDisplay(SkCanvas*, MemoryHistory*, const int& top); 75 int drawMemoryDisplay(SkCanvas*, MemoryHistory*, const int& top);
81 int drawPaintTimeDisplay(SkCanvas*, PaintTimeCounter*, const int& top); 76 int drawPaintTimeDisplay(SkCanvas*, PaintTimeCounter*, const int& top);
82 77
83 void drawDebugRects(SkCanvas*, DebugRectHistory*); 78 void drawDebugRects(SkCanvas*, DebugRectHistory*);
84 79
85 scoped_ptr<FontAtlas> m_fontAtlas;
86 scoped_ptr<ScopedResource> m_hudTexture; 80 scoped_ptr<ScopedResource> m_hudTexture;
87 scoped_ptr<SkCanvas> m_hudCanvas; 81 scoped_ptr<SkCanvas> m_hudCanvas;
88 82
89 skia::RefPtr<SkTypeface> m_typeface; 83 skia::RefPtr<SkTypeface> m_typeface;
90 84
91 Graph m_fpsGraph; 85 Graph m_fpsGraph;
92 Graph m_paintTimeGraph; 86 Graph m_paintTimeGraph;
93 87
94 base::TimeTicks m_timeOfLastGraphUpdate; 88 base::TimeTicks m_timeOfLastGraphUpdate;
95 }; 89 };
96 90
97 } // namespace cc 91 } // namespace cc
98 92
99 #endif // CC_HEADS_UP_DISPLAY_LAYER_IMPL_H_ 93 #endif // CC_HEADS_UP_DISPLAY_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/heads_up_display_layer.cc ('k') | cc/heads_up_display_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698