| 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 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1323 | 1323 |
| 1324 const std::vector<PictureLayerImpl*>& LayerTreeHostImpl::GetPictureLayers() | 1324 const std::vector<PictureLayerImpl*>& LayerTreeHostImpl::GetPictureLayers() |
| 1325 const { | 1325 const { |
| 1326 return picture_layers_; | 1326 return picture_layers_; |
| 1327 } | 1327 } |
| 1328 | 1328 |
| 1329 void LayerTreeHostImpl::NotifyReadyToActivate() { | 1329 void LayerTreeHostImpl::NotifyReadyToActivate() { |
| 1330 client_->NotifyReadyToActivate(); | 1330 client_->NotifyReadyToActivate(); |
| 1331 } | 1331 } |
| 1332 | 1332 |
| 1333 void LayerTreeHostImpl::NotifyReadyToDraw() { |
| 1334 client_->NotifyReadyToDraw(); |
| 1335 } |
| 1336 |
| 1333 void LayerTreeHostImpl::NotifyTileStateChanged(const Tile* tile) { | 1337 void LayerTreeHostImpl::NotifyTileStateChanged(const Tile* tile) { |
| 1334 TRACE_EVENT0("cc", "LayerTreeHostImpl::NotifyTileStateChanged"); | 1338 TRACE_EVENT0("cc", "LayerTreeHostImpl::NotifyTileStateChanged"); |
| 1335 | 1339 |
| 1336 if (active_tree_) { | 1340 if (active_tree_) { |
| 1337 LayerImpl* layer_impl = | 1341 LayerImpl* layer_impl = |
| 1338 active_tree_->FindActiveTreeLayerById(tile->layer_id()); | 1342 active_tree_->FindActiveTreeLayerById(tile->layer_id()); |
| 1339 if (layer_impl) | 1343 if (layer_impl) |
| 1340 layer_impl->NotifyTileStateChanged(tile); | 1344 layer_impl->NotifyTileStateChanged(tile); |
| 1341 } | 1345 } |
| 1342 | 1346 |
| (...skipping 2132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3475 } | 3479 } |
| 3476 | 3480 |
| 3477 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3481 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3478 std::vector<PictureLayerImpl*>::iterator it = | 3482 std::vector<PictureLayerImpl*>::iterator it = |
| 3479 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3483 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3480 DCHECK(it != picture_layers_.end()); | 3484 DCHECK(it != picture_layers_.end()); |
| 3481 picture_layers_.erase(it); | 3485 picture_layers_.erase(it); |
| 3482 } | 3486 } |
| 3483 | 3487 |
| 3484 } // namespace cc | 3488 } // namespace cc |
| OLD | NEW |