| 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/delegated_renderer_layer.h" | 5 #include "cc/layers/delegated_renderer_layer.h" |
| 6 | 6 |
| 7 #include "cc/layers/delegated_renderer_layer_impl.h" | 7 #include "cc/layers/delegated_renderer_layer_impl.h" |
| 8 #include "cc/output/delegated_frame_data.h" | 8 #include "cc/output/delegated_frame_data.h" |
| 9 #include "cc/quads/render_pass_draw_quad.h" | 9 #include "cc/quads/render_pass_draw_quad.h" |
| 10 #include "cc/trees/layer_tree_host.h" | 10 #include "cc/trees/layer_tree_host.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 weak_ptrs_(this) { | 26 weak_ptrs_(this) { |
| 27 frame_provider_->AddObserver(this); | 27 frame_provider_->AddObserver(this); |
| 28 } | 28 } |
| 29 | 29 |
| 30 DelegatedRendererLayer::~DelegatedRendererLayer() { | 30 DelegatedRendererLayer::~DelegatedRendererLayer() { |
| 31 frame_provider_->RemoveObserver(this); | 31 frame_provider_->RemoveObserver(this); |
| 32 } | 32 } |
| 33 | 33 |
| 34 scoped_ptr<LayerImpl> DelegatedRendererLayer::CreateLayerImpl( | 34 scoped_ptr<LayerImpl> DelegatedRendererLayer::CreateLayerImpl( |
| 35 LayerTreeImpl* tree_impl) { | 35 LayerTreeImpl* tree_impl) { |
| 36 return DelegatedRendererLayerImpl::Create(tree_impl, layer_id_); | 36 return DelegatedRendererLayerImpl::Create( |
| 37 tree_impl, layer_id_).PassAs<LayerImpl>(); |
| 37 } | 38 } |
| 38 | 39 |
| 39 void DelegatedRendererLayer::SetLayerTreeHost(LayerTreeHost* host) { | 40 void DelegatedRendererLayer::SetLayerTreeHost(LayerTreeHost* host) { |
| 40 if (layer_tree_host() == host) { | 41 if (layer_tree_host() == host) { |
| 41 Layer::SetLayerTreeHost(host); | 42 Layer::SetLayerTreeHost(host); |
| 42 return; | 43 return; |
| 43 } | 44 } |
| 44 | 45 |
| 45 if (!host) { | 46 if (!host) { |
| 46 // The active frame needs to be removed from the active tree and resources | 47 // The active frame needs to be removed from the active tree and resources |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 94 |
| 94 SetNeedsPushProperties(); | 95 SetNeedsPushProperties(); |
| 95 return true; | 96 return true; |
| 96 } | 97 } |
| 97 | 98 |
| 98 bool DelegatedRendererLayer::HasDelegatedContent() const { | 99 bool DelegatedRendererLayer::HasDelegatedContent() const { |
| 99 return true; | 100 return true; |
| 100 } | 101 } |
| 101 | 102 |
| 102 } // namespace cc | 103 } // namespace cc |
| OLD | NEW |