OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1209 // what's necessary. | 1209 // what's necessary. |
1210 SetFullRootLayerDamage(); | 1210 SetFullRootLayerDamage(); |
1211 if (client_ && !client_->IsInsideDraw()) | 1211 if (client_ && !client_->IsInsideDraw()) |
1212 client_->DidInitializeVisibleTileOnImplThread(); | 1212 client_->DidInitializeVisibleTileOnImplThread(); |
1213 } | 1213 } |
1214 | 1214 |
1215 void LayerTreeHostImpl::NotifyReadyToActivate() { | 1215 void LayerTreeHostImpl::NotifyReadyToActivate() { |
1216 client_->NotifyReadyToActivate(); | 1216 client_->NotifyReadyToActivate(); |
1217 } | 1217 } |
1218 | 1218 |
| 1219 void LayerTreeHostImpl::NotifyTileInitialized(const Tile* tile) { |
| 1220 TRACE_EVENT0("cc", "LayerTreeHostImpl::NotifyTileInitialized"); |
| 1221 |
| 1222 if (active_tree_) { |
| 1223 LayerImpl* layer_impl = |
| 1224 active_tree_->FindActiveTreeLayerById(tile->layer_id()); |
| 1225 if (layer_impl) |
| 1226 layer_impl->NotifyTileInitialized(tile); |
| 1227 } |
| 1228 |
| 1229 if (pending_tree_) { |
| 1230 LayerImpl* layer_impl = |
| 1231 pending_tree_->FindPendingTreeLayerById(tile->layer_id()); |
| 1232 if (layer_impl) |
| 1233 layer_impl->NotifyTileInitialized(tile); |
| 1234 } |
| 1235 } |
| 1236 |
1219 void LayerTreeHostImpl::SetMemoryPolicy(const ManagedMemoryPolicy& policy) { | 1237 void LayerTreeHostImpl::SetMemoryPolicy(const ManagedMemoryPolicy& policy) { |
1220 SetManagedMemoryPolicy(policy, zero_budget_); | 1238 SetManagedMemoryPolicy(policy, zero_budget_); |
1221 } | 1239 } |
1222 | 1240 |
1223 void LayerTreeHostImpl::SetTreeActivationCallback( | 1241 void LayerTreeHostImpl::SetTreeActivationCallback( |
1224 const base::Closure& callback) { | 1242 const base::Closure& callback) { |
1225 DCHECK(proxy_->IsImplThread()); | 1243 DCHECK(proxy_->IsImplThread()); |
1226 DCHECK(settings_.impl_side_painting || callback.is_null()); | 1244 DCHECK(settings_.impl_side_painting || callback.is_null()); |
1227 tree_activation_callback_ = callback; | 1245 tree_activation_callback_ = callback; |
1228 } | 1246 } |
(...skipping 1822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3051 swap_promise_monitor_.erase(monitor); | 3069 swap_promise_monitor_.erase(monitor); |
3052 } | 3070 } |
3053 | 3071 |
3054 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 3072 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
3055 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 3073 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
3056 for (; it != swap_promise_monitor_.end(); it++) | 3074 for (; it != swap_promise_monitor_.end(); it++) |
3057 (*it)->OnSetNeedsRedrawOnImpl(); | 3075 (*it)->OnSetNeedsRedrawOnImpl(); |
3058 } | 3076 } |
3059 | 3077 |
3060 } // namespace cc | 3078 } // namespace cc |
OLD | NEW |