| OLD | NEW |
| 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" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl { | 25 class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl { |
| 26 public: | 26 public: |
| 27 static scoped_ptr<HeadsUpDisplayLayerImpl> create(int id) | 27 static scoped_ptr<HeadsUpDisplayLayerImpl> create(int id) |
| 28 { | 28 { |
| 29 return make_scoped_ptr(new HeadsUpDisplayLayerImpl(id)); | 29 return make_scoped_ptr(new HeadsUpDisplayLayerImpl(id)); |
| 30 } | 30 } |
| 31 virtual ~HeadsUpDisplayLayerImpl(); | 31 virtual ~HeadsUpDisplayLayerImpl(); |
| 32 | 32 |
| 33 void setFontAtlas(scoped_ptr<FontAtlas>); | 33 void setFontAtlas(scoped_ptr<FontAtlas>); |
| 34 void setShowFPSCounter(bool); | |
| 35 | 34 |
| 36 virtual void willDraw(ResourceProvider*) OVERRIDE; | 35 virtual void willDraw(ResourceProvider*) OVERRIDE; |
| 37 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE; | 36 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE; |
| 38 void updateHudTexture(ResourceProvider*); | 37 void updateHudTexture(ResourceProvider*); |
| 39 virtual void didDraw(ResourceProvider*) OVERRIDE; | 38 virtual void didDraw(ResourceProvider*) OVERRIDE; |
| 40 | 39 |
| 41 virtual void didLoseContext() OVERRIDE; | 40 virtual void didLoseContext() OVERRIDE; |
| 42 | 41 |
| 43 virtual bool layerIsAlwaysDamaged() const OVERRIDE; | 42 virtual bool layerIsAlwaysDamaged() const OVERRIDE; |
| 44 | 43 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 55 | 54 |
| 56 scoped_ptr<FontAtlas> m_fontAtlas; | 55 scoped_ptr<FontAtlas> m_fontAtlas; |
| 57 scoped_ptr<ScopedResource> m_hudTexture; | 56 scoped_ptr<ScopedResource> m_hudTexture; |
| 58 scoped_ptr<SkCanvas> m_hudCanvas; | 57 scoped_ptr<SkCanvas> m_hudCanvas; |
| 59 | 58 |
| 60 double m_averageFPS; | 59 double m_averageFPS; |
| 61 double m_minFPS; | 60 double m_minFPS; |
| 62 double m_maxFPS; | 61 double m_maxFPS; |
| 63 | 62 |
| 64 base::TimeTicks textUpdateTime; | 63 base::TimeTicks textUpdateTime; |
| 65 | |
| 66 bool m_showFPSCounter; | |
| 67 }; | 64 }; |
| 68 | 65 |
| 69 } // namespace cc | 66 } // namespace cc |
| 70 | 67 |
| 71 #endif // CC_HEADS_UP_DISPLAY_LAYER_IMPL_H_ | 68 #endif // CC_HEADS_UP_DISPLAY_LAYER_IMPL_H_ |
| OLD | NEW |