| 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 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 // then we will miss telling the scheduler each frame that we intend to draw | 1212 // then we will miss telling the scheduler each frame that we intend to draw |
| 1213 // so it may make worse scheduling decisions. | 1213 // so it may make worse scheduling decisions. |
| 1214 required_for_draw_tile_is_top_of_raster_queue_ = | 1214 required_for_draw_tile_is_top_of_raster_queue_ = |
| 1215 queue->Top()->required_for_draw(); | 1215 queue->Top()->required_for_draw(); |
| 1216 } else { | 1216 } else { |
| 1217 required_for_draw_tile_is_top_of_raster_queue_ = false; | 1217 required_for_draw_tile_is_top_of_raster_queue_ = false; |
| 1218 } | 1218 } |
| 1219 return queue; | 1219 return queue; |
| 1220 } | 1220 } |
| 1221 | 1221 |
| 1222 void LayerTreeHostImpl::BuildEvictionQueue(EvictionTilePriorityQueue* queue, | 1222 scoped_ptr<EvictionTilePriorityQueue> LayerTreeHostImpl::BuildEvictionQueue( |
| 1223 TreePriority tree_priority) { | 1223 TreePriority tree_priority) { |
| 1224 TRACE_EVENT0("cc", "LayerTreeHostImpl::BuildEvictionQueue"); | 1224 TRACE_EVENT0("cc", "LayerTreeHostImpl::BuildEvictionQueue"); |
| 1225 scoped_ptr<EvictionTilePriorityQueue> queue(new EvictionTilePriorityQueue); |
| 1225 picture_layer_pairs_.clear(); | 1226 picture_layer_pairs_.clear(); |
| 1226 GetPictureLayerImplPairs(&picture_layer_pairs_, false); | 1227 GetPictureLayerImplPairs(&picture_layer_pairs_, false); |
| 1227 queue->Build(picture_layer_pairs_, tree_priority); | 1228 queue->Build(picture_layer_pairs_, tree_priority); |
| 1229 return queue; |
| 1228 } | 1230 } |
| 1229 | 1231 |
| 1230 const std::vector<PictureLayerImpl*>& LayerTreeHostImpl::GetPictureLayers() | 1232 const std::vector<PictureLayerImpl*>& LayerTreeHostImpl::GetPictureLayers() |
| 1231 const { | 1233 const { |
| 1232 return picture_layers_; | 1234 return picture_layers_; |
| 1233 } | 1235 } |
| 1234 | 1236 |
| 1235 void LayerTreeHostImpl::NotifyReadyToActivate() { | 1237 void LayerTreeHostImpl::NotifyReadyToActivate() { |
| 1236 client_->NotifyReadyToActivate(); | 1238 client_->NotifyReadyToActivate(); |
| 1237 } | 1239 } |
| (...skipping 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3458 } | 3460 } |
| 3459 | 3461 |
| 3460 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 3462 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 3461 std::vector<PictureLayerImpl*>::iterator it = | 3463 std::vector<PictureLayerImpl*>::iterator it = |
| 3462 std::find(picture_layers_.begin(), picture_layers_.end(), layer); | 3464 std::find(picture_layers_.begin(), picture_layers_.end(), layer); |
| 3463 DCHECK(it != picture_layers_.end()); | 3465 DCHECK(it != picture_layers_.end()); |
| 3464 picture_layers_.erase(it); | 3466 picture_layers_.erase(it); |
| 3465 } | 3467 } |
| 3466 | 3468 |
| 3467 } // namespace cc | 3469 } // namespace cc |
| OLD | NEW |