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/heads_up_display_layer.h" | 5 #include "cc/heads_up_display_layer.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "cc/heads_up_display_layer_impl.h" | 8 #include "cc/heads_up_display_layer_impl.h" |
9 #include "cc/layer_tree_host.h" | 9 #include "cc/layer_tree_host.h" |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 { | 52 { |
53 return true; | 53 return true; |
54 } | 54 } |
55 | 55 |
56 void HeadsUpDisplayLayer::setFontAtlas(scoped_ptr<FontAtlas> fontAtlas) | 56 void HeadsUpDisplayLayer::setFontAtlas(scoped_ptr<FontAtlas> fontAtlas) |
57 { | 57 { |
58 m_fontAtlas = fontAtlas.Pass(); | 58 m_fontAtlas = fontAtlas.Pass(); |
59 m_hasFontAtlas = true; | 59 m_hasFontAtlas = true; |
60 } | 60 } |
61 | 61 |
62 scoped_ptr<LayerImpl> HeadsUpDisplayLayer::createLayerImpl(LayerTreeHostImpl* ho
stImpl) | 62 scoped_ptr<LayerImpl> HeadsUpDisplayLayer::createLayerImpl(LayerTreeImpl* treeIm
pl) |
63 { | 63 { |
64 return HeadsUpDisplayLayerImpl::create(hostImpl, m_layerId).PassAs<LayerImpl
>(); | 64 return HeadsUpDisplayLayerImpl::create(treeImpl, m_layerId).PassAs<LayerImpl
>(); |
65 } | 65 } |
66 | 66 |
67 void HeadsUpDisplayLayer::pushPropertiesTo(LayerImpl* layerImpl) | 67 void HeadsUpDisplayLayer::pushPropertiesTo(LayerImpl* layerImpl) |
68 { | 68 { |
69 Layer::pushPropertiesTo(layerImpl); | 69 Layer::pushPropertiesTo(layerImpl); |
70 | 70 |
71 if (!m_fontAtlas) | 71 if (!m_fontAtlas) |
72 return; | 72 return; |
73 | 73 |
74 HeadsUpDisplayLayerImpl* hudLayerImpl = static_cast<HeadsUpDisplayLayerImpl*
>(layerImpl); | 74 HeadsUpDisplayLayerImpl* hudLayerImpl = static_cast<HeadsUpDisplayLayerImpl*
>(layerImpl); |
75 hudLayerImpl->setFontAtlas(m_fontAtlas.Pass()); | 75 hudLayerImpl->setFontAtlas(m_fontAtlas.Pass()); |
76 } | 76 } |
77 | 77 |
78 } // namespace cc | 78 } // namespace cc |
OLD | NEW |