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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
669 | 669 |
670 SanityCheckTilingState(); | 670 SanityCheckTilingState(); |
671 } | 671 } |
672 | 672 |
673 void PictureLayerImpl::SyncTiling( | 673 void PictureLayerImpl::SyncTiling( |
674 const PictureLayerTiling* tiling) { | 674 const PictureLayerTiling* tiling) { |
675 if (!CanHaveTilingWithScale(tiling->contents_scale())) | 675 if (!CanHaveTilingWithScale(tiling->contents_scale())) |
676 return; | 676 return; |
677 tilings_->AddTiling(tiling->contents_scale()); | 677 tilings_->AddTiling(tiling->contents_scale()); |
678 | 678 |
679 if (!layer_tree_impl()->needs_update_draw_properties()) { | 679 if (!layer_tree_impl()->needs_update_draw_properties() && |
680 should_update_tile_priorities_) { | |
680 // When the tree is up to date, the set of tilings must either be empty or | 681 // When the tree is up to date, the set of tilings must either be empty or |
enne (OOO)
2014/04/28 23:45:28
Can you just move this comment and check into the
boliu
2014/04/28 23:50:39
Done.
| |
681 // contain at least one high resolution tiling. (If it is up to date, | 682 // contain at least one high resolution tiling. (If it is up to date, |
682 // then it would be invalid to sync a tiling if it is the first tiling | 683 // then it would be invalid to sync a tiling if it is the first tiling |
683 // on the layer, since there would be no high resolution tiling.) | 684 // on the layer, since there would be no high resolution tiling.) |
684 SanityCheckTilingState(); | 685 SanityCheckTilingState(); |
685 // TODO(enne): temporary sanity CHECK for http://crbug.com/358350 | 686 // TODO(enne): temporary sanity CHECK for http://crbug.com/358350 |
686 CHECK_GT(tilings_->num_tilings(), 1u); | 687 CHECK_GT(tilings_->num_tilings(), 1u); |
687 } | 688 } |
688 | 689 |
689 // If this tree needs update draw properties, then the tiling will | 690 // If this tree needs update draw properties, then the tiling will |
690 // get updated prior to drawing or activation. If this tree does not | 691 // get updated prior to drawing or activation. If this tree does not |
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1517 return iterator_index_ < iterators_.size(); | 1518 return iterator_index_ < iterators_.size(); |
1518 } | 1519 } |
1519 | 1520 |
1520 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( | 1521 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( |
1521 PictureLayerTiling::TilingEvictionTileIterator* it) const { | 1522 PictureLayerTiling::TilingEvictionTileIterator* it) const { |
1522 return it->get_type() == iteration_stage_ && | 1523 return it->get_type() == iteration_stage_ && |
1523 (**it)->required_for_activation() == required_for_activation_; | 1524 (**it)->required_for_activation() == required_for_activation_; |
1524 } | 1525 } |
1525 | 1526 |
1526 } // namespace cc | 1527 } // namespace cc |
OLD | NEW |