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 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 TRACE_EVENT0("cc", "PictureLayerImpl::UpdateTiles"); | 426 TRACE_EVENT0("cc", "PictureLayerImpl::UpdateTiles"); |
427 | 427 |
428 DoPostCommitInitializationIfNeeded(); | 428 DoPostCommitInitializationIfNeeded(); |
429 | 429 |
430 // TODO(danakj): We should always get an occlusion tracker when we are using | 430 // TODO(danakj): We should always get an occlusion tracker when we are using |
431 // occlusion, so update this check when we don't use a pending tree in the | 431 // occlusion, so update this check when we don't use a pending tree in the |
432 // browser compositor. | 432 // browser compositor. |
433 DCHECK(!occlusion_tracker || | 433 DCHECK(!occlusion_tracker || |
434 layer_tree_impl()->settings().use_occlusion_for_tile_prioritization); | 434 layer_tree_impl()->settings().use_occlusion_for_tile_prioritization); |
435 | 435 |
436 // Transforms and viewport are invalid for tile management inside a | 436 visible_rect_for_tile_priority_ = visible_content_rect(); |
437 // resourceless software draw, so don't update them. | 437 viewport_rect_for_tile_priority_ = |
438 if (!layer_tree_impl()->resourceless_software_draw()) { | 438 layer_tree_impl()->ViewportRectForTilePriority(); |
439 visible_rect_for_tile_priority_ = visible_content_rect(); | 439 screen_space_transform_for_tile_priority_ = screen_space_transform(); |
440 viewport_rect_for_tile_priority_ = | |
441 layer_tree_impl()->ViewportRectForTilePriority(); | |
442 screen_space_transform_for_tile_priority_ = screen_space_transform(); | |
443 } | |
444 | 440 |
445 if (!CanHaveTilings()) { | 441 if (!CanHaveTilings()) { |
446 ideal_page_scale_ = 0.f; | 442 ideal_page_scale_ = 0.f; |
447 ideal_device_scale_ = 0.f; | 443 ideal_device_scale_ = 0.f; |
448 ideal_contents_scale_ = 0.f; | 444 ideal_contents_scale_ = 0.f; |
449 ideal_source_scale_ = 0.f; | 445 ideal_source_scale_ = 0.f; |
450 SanityCheckTilingState(); | 446 SanityCheckTilingState(); |
451 return; | 447 return; |
452 } | 448 } |
453 | 449 |
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1773 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); | 1769 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); |
1774 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; | 1770 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; |
1775 return tiling_range.end - 1 - current_tiling_range_offset; | 1771 return tiling_range.end - 1 - current_tiling_range_offset; |
1776 } | 1772 } |
1777 } | 1773 } |
1778 NOTREACHED(); | 1774 NOTREACHED(); |
1779 return 0; | 1775 return 0; |
1780 } | 1776 } |
1781 | 1777 |
1782 } // namespace cc | 1778 } // namespace cc |
OLD | NEW |