Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Side by Side Diff: cc/layers/picture_layer_impl.cc

Issue 258053011: cc: Fix PictureLayerImpl::SanityCheck condition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698