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_LAYERS_HEADS_UP_DISPLAY_LAYER_H_ | 5 #ifndef CC_LAYERS_HEADS_UP_DISPLAY_LAYER_H_ |
6 #define CC_LAYERS_HEADS_UP_DISPLAY_LAYER_H_ | 6 #define CC_LAYERS_HEADS_UP_DISPLAY_LAYER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "cc/base/cc_export.h" | 12 #include "cc/base/cc_export.h" |
13 #include "cc/layers/layer.h" | 13 #include "cc/layers/layer.h" |
14 #include "third_party/skia/include/core/SkTypeface.h" | 14 #include "third_party/skia/include/core/SkTypeface.h" |
15 | 15 |
16 namespace cc { | 16 namespace cc { |
17 | 17 |
18 namespace proto { | 18 namespace proto { |
19 class LayerNode; | 19 class LayerNode; |
20 } // namespace proto | 20 } // namespace proto |
21 | 21 |
22 class CC_EXPORT HeadsUpDisplayLayer : public Layer { | 22 class CC_EXPORT HeadsUpDisplayLayer : public Layer { |
23 public: | 23 public: |
24 static scoped_refptr<HeadsUpDisplayLayer> Create( | 24 static scoped_refptr<HeadsUpDisplayLayer> Create(); |
25 const LayerSettings& settings); | |
26 | 25 |
27 void PrepareForCalculateDrawProperties( | 26 void PrepareForCalculateDrawProperties( |
28 const gfx::Size& device_viewport, float device_scale_factor); | 27 const gfx::Size& device_viewport, float device_scale_factor); |
29 | 28 |
30 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; | 29 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; |
31 | 30 |
32 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; | 31 void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; |
33 | 32 |
34 // Layer overrides. | 33 // Layer overrides. |
35 void PushPropertiesTo(LayerImpl* layer) override; | 34 void PushPropertiesTo(LayerImpl* layer) override; |
36 | 35 |
37 protected: | 36 protected: |
38 explicit HeadsUpDisplayLayer(const LayerSettings& settings); | 37 HeadsUpDisplayLayer(); |
39 bool HasDrawableContent() const override; | 38 bool HasDrawableContent() const override; |
40 | 39 |
41 private: | 40 private: |
42 ~HeadsUpDisplayLayer() override; | 41 ~HeadsUpDisplayLayer() override; |
43 | 42 |
44 skia::RefPtr<SkTypeface> typeface_; | 43 skia::RefPtr<SkTypeface> typeface_; |
45 | 44 |
46 DISALLOW_COPY_AND_ASSIGN(HeadsUpDisplayLayer); | 45 DISALLOW_COPY_AND_ASSIGN(HeadsUpDisplayLayer); |
47 }; | 46 }; |
48 | 47 |
49 } // namespace cc | 48 } // namespace cc |
50 | 49 |
51 #endif // CC_LAYERS_HEADS_UP_DISPLAY_LAYER_H_ | 50 #endif // CC_LAYERS_HEADS_UP_DISPLAY_LAYER_H_ |
OLD | NEW |