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

Side by Side Diff: cc/resources/picture_layer_tiling.cc

Issue 230983004: cc: Fix TilePriority::IsHigherPriorityThan to be correct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « cc/cc_tests.gyp ('k') | cc/resources/tile_priority.h » ('j') | 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/resources/picture_layer_tiling.h" 5 #include "cc/resources/picture_layer_tiling.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 10
(...skipping 15 matching lines...) Expand all
26 ~TileEvictionOrder() {} 26 ~TileEvictionOrder() {}
27 27
28 bool operator()(const Tile* a, const Tile* b) { 28 bool operator()(const Tile* a, const Tile* b) {
29 const TilePriority& a_priority = a->priority(tree_); 29 const TilePriority& a_priority = a->priority(tree_);
30 const TilePriority& b_priority = b->priority(tree_); 30 const TilePriority& b_priority = b->priority(tree_);
31 31
32 if (a_priority.priority_bin == b_priority.priority_bin && 32 if (a_priority.priority_bin == b_priority.priority_bin &&
33 a->required_for_activation() != b->required_for_activation()) { 33 a->required_for_activation() != b->required_for_activation()) {
34 return b->required_for_activation(); 34 return b->required_for_activation();
35 } 35 }
36 return a_priority.IsHigherPriorityThan(b_priority); 36 return b_priority.IsHigherPriorityThan(a_priority);
37 } 37 }
38 38
39 private: 39 private:
40 WhichTree tree_; 40 WhichTree tree_;
41 }; 41 };
42 } // namespace 42 } // namespace
43 43
44 scoped_ptr<PictureLayerTiling> PictureLayerTiling::Create( 44 scoped_ptr<PictureLayerTiling> PictureLayerTiling::Create(
45 float contents_scale, 45 float contents_scale,
46 const gfx::Size& layer_bounds, 46 const gfx::Size& layer_bounds,
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 tiling_->UpdateEvictionCacheIfNeeded(tree_); 925 tiling_->UpdateEvictionCacheIfNeeded(tree_);
926 tile_iterator_ = tiling_->eviction_tiles_cache_.begin(); 926 tile_iterator_ = tiling_->eviction_tiles_cache_.begin();
927 is_valid_ = true; 927 is_valid_ = true;
928 if (tile_iterator_ != tiling_->eviction_tiles_cache_.end() && 928 if (tile_iterator_ != tiling_->eviction_tiles_cache_.end() &&
929 !(*tile_iterator_)->HasResources()) { 929 !(*tile_iterator_)->HasResources()) {
930 ++(*this); 930 ++(*this);
931 } 931 }
932 } 932 }
933 933
934 } // namespace cc 934 } // namespace cc
OLDNEW
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/resources/tile_priority.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698