| 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // Transforms and viewport are invalid for tile management inside a |
| 437 // resourceless software draw, so don't update them. | 437 // resourceless software draw, so don't update them. |
| 438 if (!layer_tree_impl()->resourceless_software_draw()) { | 438 visible_rect_for_tile_priority_ = visible_content_rect(); |
| 439 visible_rect_for_tile_priority_ = visible_content_rect(); | 439 viewport_rect_for_tile_priority_ = |
| 440 viewport_rect_for_tile_priority_ = | 440 layer_tree_impl()->ViewportRectForTilePriority(); |
| 441 layer_tree_impl()->ViewportRectForTilePriority(); | 441 screen_space_transform_for_tile_priority_ = screen_space_transform(); |
| 442 screen_space_transform_for_tile_priority_ = screen_space_transform(); | |
| 443 } | |
| 444 | 442 |
| 445 if (!CanHaveTilings()) { | 443 if (!CanHaveTilings()) { |
| 446 ideal_page_scale_ = 0.f; | 444 ideal_page_scale_ = 0.f; |
| 447 ideal_device_scale_ = 0.f; | 445 ideal_device_scale_ = 0.f; |
| 448 ideal_contents_scale_ = 0.f; | 446 ideal_contents_scale_ = 0.f; |
| 449 ideal_source_scale_ = 0.f; | 447 ideal_source_scale_ = 0.f; |
| 450 SanityCheckTilingState(); | 448 SanityCheckTilingState(); |
| 451 return; | 449 return; |
| 452 } | 450 } |
| 453 | 451 |
| (...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1773 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); | 1771 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); |
| 1774 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; | 1772 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; |
| 1775 return tiling_range.end - 1 - current_tiling_range_offset; | 1773 return tiling_range.end - 1 - current_tiling_range_offset; |
| 1776 } | 1774 } |
| 1777 } | 1775 } |
| 1778 NOTREACHED(); | 1776 NOTREACHED(); |
| 1779 return 0; | 1777 return 0; |
| 1780 } | 1778 } |
| 1781 | 1779 |
| 1782 } // namespace cc | 1780 } // namespace cc |
| OLD | NEW |