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

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

Issue 1421483005: Reland: Remove DCHECK_IMPLIES/CHECK_IMPLIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/tiles/picture_layer_tiling.cc ('k') | cc/tiles/tile_manager.cc » ('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/tiles/picture_layer_tiling_set.h" 5 #include "cc/tiles/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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void PictureLayerTilingSet::UpdateTilingsToCurrentRasterSourceForCommit( 133 void PictureLayerTilingSet::UpdateTilingsToCurrentRasterSourceForCommit(
134 scoped_refptr<DisplayListRasterSource> raster_source, 134 scoped_refptr<DisplayListRasterSource> raster_source,
135 const Region& layer_invalidation, 135 const Region& layer_invalidation,
136 float minimum_contents_scale, 136 float minimum_contents_scale,
137 float maximum_contents_scale) { 137 float maximum_contents_scale) {
138 RemoveTilingsBelowScale(minimum_contents_scale); 138 RemoveTilingsBelowScale(minimum_contents_scale);
139 RemoveTilingsAboveScale(maximum_contents_scale); 139 RemoveTilingsAboveScale(maximum_contents_scale);
140 140
141 // Invalidate tiles and update them to the new raster source. 141 // Invalidate tiles and update them to the new raster source.
142 for (PictureLayerTiling* tiling : tilings_) { 142 for (PictureLayerTiling* tiling : tilings_) {
143 DCHECK_IMPLIES(tree_ == PENDING_TREE, !tiling->has_tiles()); 143 DCHECK(tree_ != PENDING_TREE || !tiling->has_tiles());
144 tiling->SetRasterSourceAndResize(raster_source); 144 tiling->SetRasterSourceAndResize(raster_source);
145 145
146 // We can commit on either active or pending trees, but only active one can 146 // We can commit on either active or pending trees, but only active one can
147 // have tiles at this point. 147 // have tiles at this point.
148 if (tree_ == ACTIVE_TREE) 148 if (tree_ == ACTIVE_TREE)
149 tiling->Invalidate(layer_invalidation); 149 tiling->Invalidate(layer_invalidation);
150 150
151 // This is needed for cases where the live tiles rect didn't change but 151 // This is needed for cases where the live tiles rect didn't change but
152 // recordings exist in the raster source that did not exist on the last 152 // recordings exist in the raster source that did not exist on the last
153 // raster source. 153 // raster source.
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 case LOWER_THAN_LOW_RES: 575 case LOWER_THAN_LOW_RES:
576 range = TilingRange(low_res_range.end, tilings_size); 576 range = TilingRange(low_res_range.end, tilings_size);
577 break; 577 break;
578 } 578 }
579 579
580 DCHECK_LE(range.start, range.end); 580 DCHECK_LE(range.start, range.end);
581 return range; 581 return range;
582 } 582 }
583 583
584 } // namespace cc 584 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/picture_layer_tiling.cc ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698