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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 | 1327 |
1328 void LayerTreeHostImpl::DidModifyTilePriorities() { | 1328 void LayerTreeHostImpl::DidModifyTilePriorities() { |
1329 // Mark priorities as dirty and schedule a PrepareTiles(). | 1329 // Mark priorities as dirty and schedule a PrepareTiles(). |
1330 tile_priorities_dirty_ = true; | 1330 tile_priorities_dirty_ = true; |
1331 client_->SetNeedsPrepareTilesOnImplThread(); | 1331 client_->SetNeedsPrepareTilesOnImplThread(); |
1332 } | 1332 } |
1333 | 1333 |
1334 scoped_ptr<RasterTilePriorityQueue> LayerTreeHostImpl::BuildRasterQueue( | 1334 scoped_ptr<RasterTilePriorityQueue> LayerTreeHostImpl::BuildRasterQueue( |
1335 TreePriority tree_priority, | 1335 TreePriority tree_priority, |
1336 RasterTilePriorityQueue::Type type) { | 1336 RasterTilePriorityQueue::Type type) { |
1337 TRACE_EVENT0("cc", "LayerTreeHostImpl::BuildRasterQueue"); | 1337 TRACE_EVENT0("disabled-by-default-cc.debug", |
| 1338 "LayerTreeHostImpl::BuildRasterQueue"); |
1338 | 1339 |
1339 return RasterTilePriorityQueue::Create(active_tree_->picture_layers(), | 1340 return RasterTilePriorityQueue::Create(active_tree_->picture_layers(), |
1340 pending_tree_ | 1341 pending_tree_ |
1341 ? pending_tree_->picture_layers() | 1342 ? pending_tree_->picture_layers() |
1342 : std::vector<PictureLayerImpl*>(), | 1343 : std::vector<PictureLayerImpl*>(), |
1343 tree_priority, type); | 1344 tree_priority, type); |
1344 } | 1345 } |
1345 | 1346 |
1346 scoped_ptr<EvictionTilePriorityQueue> LayerTreeHostImpl::BuildEvictionQueue( | 1347 scoped_ptr<EvictionTilePriorityQueue> LayerTreeHostImpl::BuildEvictionQueue( |
1347 TreePriority tree_priority) { | 1348 TreePriority tree_priority) { |
1348 TRACE_EVENT0("cc", "LayerTreeHostImpl::BuildEvictionQueue"); | 1349 TRACE_EVENT0("disabled-by-default-cc.debug", |
| 1350 "LayerTreeHostImpl::BuildEvictionQueue"); |
1349 | 1351 |
1350 scoped_ptr<EvictionTilePriorityQueue> queue(new EvictionTilePriorityQueue); | 1352 scoped_ptr<EvictionTilePriorityQueue> queue(new EvictionTilePriorityQueue); |
1351 queue->Build(active_tree_->picture_layers(), | 1353 queue->Build(active_tree_->picture_layers(), |
1352 pending_tree_ ? pending_tree_->picture_layers() | 1354 pending_tree_ ? pending_tree_->picture_layers() |
1353 : std::vector<PictureLayerImpl*>(), | 1355 : std::vector<PictureLayerImpl*>(), |
1354 tree_priority); | 1356 tree_priority); |
1355 return queue; | 1357 return queue; |
1356 } | 1358 } |
1357 | 1359 |
1358 void LayerTreeHostImpl::SetIsLikelyToRequireADraw( | 1360 void LayerTreeHostImpl::SetIsLikelyToRequireADraw( |
(...skipping 2558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3917 return task_runner_provider_->HasImplThread(); | 3919 return task_runner_provider_->HasImplThread(); |
3918 } | 3920 } |
3919 | 3921 |
3920 bool LayerTreeHostImpl::CommitToActiveTree() const { | 3922 bool LayerTreeHostImpl::CommitToActiveTree() const { |
3921 // In single threaded mode we skip the pending tree and commit directly to the | 3923 // In single threaded mode we skip the pending tree and commit directly to the |
3922 // active tree. | 3924 // active tree. |
3923 return !task_runner_provider_->HasImplThread(); | 3925 return !task_runner_provider_->HasImplThread(); |
3924 } | 3926 } |
3925 | 3927 |
3926 } // namespace cc | 3928 } // namespace cc |
OLD | NEW |