| 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/delegated_renderer_layer.h" | 5 #include "cc/delegated_renderer_layer.h" |
| 6 | 6 |
| 7 #include "cc/delegated_renderer_layer_impl.h" | 7 #include "cc/delegated_renderer_layer_impl.h" |
| 8 | 8 |
| 9 namespace cc { | 9 namespace cc { |
| 10 | 10 |
| 11 scoped_refptr<DelegatedRendererLayer> DelegatedRendererLayer::Create() { | 11 scoped_refptr<DelegatedRendererLayer> DelegatedRendererLayer::Create() { |
| 12 return scoped_refptr<DelegatedRendererLayer>(new DelegatedRendererLayer()); | 12 return scoped_refptr<DelegatedRendererLayer>(new DelegatedRendererLayer()); |
| 13 } | 13 } |
| 14 | 14 |
| 15 DelegatedRendererLayer::DelegatedRendererLayer() | 15 DelegatedRendererLayer::DelegatedRendererLayer() |
| 16 : Layer() { | 16 : Layer() { |
| 17 setIsDrawable(true); | |
| 18 } | 17 } |
| 19 | 18 |
| 20 DelegatedRendererLayer::~DelegatedRendererLayer() {} | 19 DelegatedRendererLayer::~DelegatedRendererLayer() {} |
| 21 | 20 |
| 22 scoped_ptr<LayerImpl> DelegatedRendererLayer::createLayerImpl( | 21 scoped_ptr<LayerImpl> DelegatedRendererLayer::createLayerImpl( |
| 23 LayerTreeImpl* tree_impl) { | 22 LayerTreeImpl* tree_impl) { |
| 24 return DelegatedRendererLayerImpl::Create( | 23 return DelegatedRendererLayerImpl::Create( |
| 25 tree_impl, m_layerId).PassAs<LayerImpl>(); | 24 tree_impl, m_layerId).PassAs<LayerImpl>(); |
| 26 } | 25 } |
| 27 | 26 |
| 27 void DelegatedRendererLayer::pushPropertiesTo(LayerImpl* impl) { |
| 28 Layer::pushPropertiesTo(impl); |
| 29 |
| 30 DelegatedRendererLayerImpl* delegated_impl = |
| 31 static_cast<DelegatedRendererLayerImpl*>(impl); |
| 32 delegated_impl->CreateChildIdIfNeeded(); |
| 33 } |
| 34 |
| 28 } // namespace cc | 35 } // namespace cc |
| OLD | NEW |