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/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 TRACE_EVENT0("cc", "PictureLayerImpl::UpdateTiles"); | 392 TRACE_EVENT0("cc", "PictureLayerImpl::UpdateTiles"); |
393 | 393 |
394 DoPostCommitInitializationIfNeeded(); | 394 DoPostCommitInitializationIfNeeded(); |
395 | 395 |
396 // TODO(danakj): We should always get an occlusion tracker when we are using | 396 // TODO(danakj): We should always get an occlusion tracker when we are using |
397 // occlusion, so update this check when we don't use a pending tree in the | 397 // occlusion, so update this check when we don't use a pending tree in the |
398 // browser compositor. | 398 // browser compositor. |
399 DCHECK(!occlusion_tracker || | 399 DCHECK(!occlusion_tracker || |
400 layer_tree_impl()->settings().use_occlusion_for_tile_prioritization); | 400 layer_tree_impl()->settings().use_occlusion_for_tile_prioritization); |
401 | 401 |
402 if (layer_tree_impl()->device_viewport_valid_for_tile_management()) { | 402 // Transforms and viewport are invalid for tile management inside a |
| 403 // resourceless software draw, so don't update them. |
| 404 if (!layer_tree_impl()->resourceless_software_draw()) { |
403 visible_rect_for_tile_priority_ = visible_content_rect(); | 405 visible_rect_for_tile_priority_ = visible_content_rect(); |
404 viewport_size_for_tile_priority_ = layer_tree_impl()->DrawViewportSize(); | 406 viewport_size_for_tile_priority_ = layer_tree_impl()->DrawViewportSize(); |
405 screen_space_transform_for_tile_priority_ = screen_space_transform(); | 407 screen_space_transform_for_tile_priority_ = screen_space_transform(); |
406 } | 408 } |
407 | 409 |
408 if (!CanHaveTilings()) { | 410 if (!CanHaveTilings()) { |
409 ideal_page_scale_ = 0.f; | 411 ideal_page_scale_ = 0.f; |
410 ideal_device_scale_ = 0.f; | 412 ideal_device_scale_ = 0.f; |
411 ideal_contents_scale_ = 0.f; | 413 ideal_contents_scale_ = 0.f; |
412 ideal_source_scale_ = 0.f; | 414 ideal_source_scale_ = 0.f; |
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1632 return iterator_index_ < iterators_.size(); | 1634 return iterator_index_ < iterators_.size(); |
1633 } | 1635 } |
1634 | 1636 |
1635 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( | 1637 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( |
1636 PictureLayerTiling::TilingEvictionTileIterator* it) const { | 1638 PictureLayerTiling::TilingEvictionTileIterator* it) const { |
1637 return it->get_type() == iteration_stage_ && | 1639 return it->get_type() == iteration_stage_ && |
1638 (**it)->required_for_activation() == required_for_activation_; | 1640 (**it)->required_for_activation() == required_for_activation_; |
1639 } | 1641 } |
1640 | 1642 |
1641 } // namespace cc | 1643 } // namespace cc |
OLD | NEW |