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

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

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | cc/resources/prioritized_resource.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_set.h" 5 #include "cc/resources/picture_layer_tiling_set.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 tiling->CreateMissingTilesInLiveTilesRect(); 98 tiling->CreateMissingTilesInLiveTilesRect();
99 99
100 // If |twin_set| is present, use the resolutions from there. Otherwise leave 100 // If |twin_set| is present, use the resolutions from there. Otherwise leave
101 // all resolutions as they are. 101 // all resolutions as they are.
102 if (twin_set) 102 if (twin_set)
103 tiling->set_resolution(NON_IDEAL_RESOLUTION); 103 tiling->set_resolution(NON_IDEAL_RESOLUTION);
104 } 104 }
105 105
106 tilings_.sort(LargestToSmallestScaleFunctor()); 106 tilings_.sort(LargestToSmallestScaleFunctor());
107 107
108 #if DCHECK_IS_ON 108 #if DCHECK_IS_ON()
109 for (PictureLayerTiling* tiling : tilings_) { 109 for (PictureLayerTiling* tiling : tilings_) {
110 DCHECK(tiling->tile_size() == 110 DCHECK(tiling->tile_size() ==
111 client_->CalculateTileSize(tiling->tiling_size())) 111 client_->CalculateTileSize(tiling->tiling_size()))
112 << "tile_size: " << tiling->tile_size().ToString() 112 << "tile_size: " << tiling->tile_size().ToString()
113 << " tiling_size: " << tiling->tiling_size().ToString() 113 << " tiling_size: " << tiling->tiling_size().ToString()
114 << " CalculateTileSize: " 114 << " CalculateTileSize: "
115 << client_->CalculateTileSize(tiling->tiling_size()).ToString(); 115 << client_->CalculateTileSize(tiling->tiling_size()).ToString();
116 } 116 }
117 117
118 if (!tilings_.empty()) { 118 if (!tilings_.empty()) {
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 case LOWER_THAN_LOW_RES: 536 case LOWER_THAN_LOW_RES:
537 range = TilingRange(low_res_range.end, tilings_.size()); 537 range = TilingRange(low_res_range.end, tilings_.size());
538 break; 538 break;
539 } 539 }
540 540
541 DCHECK_LE(range.start, range.end); 541 DCHECK_LE(range.start, range.end);
542 return range; 542 return range;
543 } 543 }
544 544
545 } // namespace cc 545 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | cc/resources/prioritized_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698