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 #include "cc/layers/heads_up_display_layer.h" | 5 #include "cc/layers/heads_up_display_layer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "cc/layers/heads_up_display_layer_impl.h" | 10 #include "cc/layers/heads_up_display_layer_impl.h" |
| 11 #include "cc/proto/layer.pb.h" |
11 #include "cc/trees/layer_tree_host.h" | 12 #include "cc/trees/layer_tree_host.h" |
12 | 13 |
13 namespace cc { | 14 namespace cc { |
14 | 15 |
15 scoped_refptr<HeadsUpDisplayLayer> HeadsUpDisplayLayer::Create( | 16 scoped_refptr<HeadsUpDisplayLayer> HeadsUpDisplayLayer::Create( |
16 const LayerSettings& settings) { | 17 const LayerSettings& settings) { |
17 return make_scoped_refptr(new HeadsUpDisplayLayer(settings)); | 18 return make_scoped_refptr(new HeadsUpDisplayLayer(settings)); |
18 } | 19 } |
19 | 20 |
20 HeadsUpDisplayLayer::HeadsUpDisplayLayer(const LayerSettings& settings) | 21 HeadsUpDisplayLayer::HeadsUpDisplayLayer(const LayerSettings& settings) |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 55 |
55 bool HeadsUpDisplayLayer::HasDrawableContent() const { | 56 bool HeadsUpDisplayLayer::HasDrawableContent() const { |
56 return true; | 57 return true; |
57 } | 58 } |
58 | 59 |
59 scoped_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl( | 60 scoped_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl( |
60 LayerTreeImpl* tree_impl) { | 61 LayerTreeImpl* tree_impl) { |
61 return HeadsUpDisplayLayerImpl::Create(tree_impl, layer_id_); | 62 return HeadsUpDisplayLayerImpl::Create(tree_impl, layer_id_); |
62 } | 63 } |
63 | 64 |
| 65 void HeadsUpDisplayLayer::SetTypeForProtoSerialization( |
| 66 proto::LayerNode* proto) const { |
| 67 proto->set_type(proto::LayerType::HEADS_UP_DISPLAY_LAYER); |
| 68 } |
| 69 |
64 } // namespace cc | 70 } // namespace cc |
OLD | NEW |