| 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" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 SetBounds(bounds); | 56 SetBounds(bounds); |
| 57 SetTransform(matrix); | 57 SetTransform(matrix); |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool HeadsUpDisplayLayer::HasDrawableContent() const { | 60 bool HeadsUpDisplayLayer::HasDrawableContent() const { |
| 61 return true; | 61 return true; |
| 62 } | 62 } |
| 63 | 63 |
| 64 std::unique_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl( | 64 std::unique_ptr<LayerImpl> HeadsUpDisplayLayer::CreateLayerImpl( |
| 65 LayerTreeImpl* tree_impl) { | 65 LayerTreeImpl* tree_impl) { |
| 66 return HeadsUpDisplayLayerImpl::Create(tree_impl, layer_id_); | 66 return HeadsUpDisplayLayerImpl::Create(tree_impl, id()); |
| 67 } | 67 } |
| 68 | 68 |
| 69 void HeadsUpDisplayLayer::SetTypeForProtoSerialization( | 69 void HeadsUpDisplayLayer::SetTypeForProtoSerialization( |
| 70 proto::LayerNode* proto) const { | 70 proto::LayerNode* proto) const { |
| 71 proto->set_type(proto::LayerNode::HEADS_UP_DISPLAY_LAYER); | 71 proto->set_type(proto::LayerNode::HEADS_UP_DISPLAY_LAYER); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void HeadsUpDisplayLayer::PushPropertiesTo(LayerImpl* layer) { | 74 void HeadsUpDisplayLayer::PushPropertiesTo(LayerImpl* layer) { |
| 75 Layer::PushPropertiesTo(layer); | 75 Layer::PushPropertiesTo(layer); |
| 76 TRACE_EVENT0("cc", "HeadsUpDisplayLayer::PushPropertiesTo"); | 76 TRACE_EVENT0("cc", "HeadsUpDisplayLayer::PushPropertiesTo"); |
| 77 HeadsUpDisplayLayerImpl* layer_impl = | 77 HeadsUpDisplayLayerImpl* layer_impl = |
| 78 static_cast<HeadsUpDisplayLayerImpl*>(layer); | 78 static_cast<HeadsUpDisplayLayerImpl*>(layer); |
| 79 | 79 |
| 80 layer_impl->SetHUDTypeface(typeface_); | 80 layer_impl->SetHUDTypeface(typeface_); |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace cc | 83 } // namespace cc |
| OLD | NEW |