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

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

Issue 1213193003: Remove DCHECK_IMPLIES and CHECK_IMPLIES (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 void PictureLayerTilingSet::UpdateTilingsToCurrentRasterSourceForCommit( 130 void PictureLayerTilingSet::UpdateTilingsToCurrentRasterSourceForCommit(
131 scoped_refptr<RasterSource> raster_source, 131 scoped_refptr<RasterSource> raster_source,
132 const Region& layer_invalidation, 132 const Region& layer_invalidation,
133 float minimum_contents_scale, 133 float minimum_contents_scale,
134 float maximum_contents_scale) { 134 float maximum_contents_scale) {
135 RemoveTilingsBelowScale(minimum_contents_scale); 135 RemoveTilingsBelowScale(minimum_contents_scale);
136 RemoveTilingsAboveScale(maximum_contents_scale); 136 RemoveTilingsAboveScale(maximum_contents_scale);
137 137
138 // Invalidate tiles and update them to the new raster source. 138 // Invalidate tiles and update them to the new raster source.
139 for (PictureLayerTiling* tiling : tilings_) { 139 for (PictureLayerTiling* tiling : tilings_) {
140 DCHECK_IMPLIES(tree_ == PENDING_TREE, !tiling->has_tiles()); 140 DCHECK(tree_ != PENDING_TREE || !tiling->has_tiles());
141 tiling->SetRasterSourceAndResize(raster_source); 141 tiling->SetRasterSourceAndResize(raster_source);
142 142
143 // We can commit on either active or pending trees, but only active one can 143 // We can commit on either active or pending trees, but only active one can
144 // have tiles at this point. 144 // have tiles at this point.
145 if (tree_ == ACTIVE_TREE) 145 if (tree_ == ACTIVE_TREE)
146 tiling->Invalidate(layer_invalidation); 146 tiling->Invalidate(layer_invalidation);
147 147
148 // This is needed for cases where the live tiles rect didn't change but 148 // This is needed for cases where the live tiles rect didn't change but
149 // recordings exist in the raster source that did not exist on the last 149 // recordings exist in the raster source that did not exist on the last
150 // raster source. 150 // raster source.
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 case LOWER_THAN_LOW_RES: 584 case LOWER_THAN_LOW_RES:
585 range = TilingRange(low_res_range.end, tilings_size); 585 range = TilingRange(low_res_range.end, tilings_size);
586 break; 586 break;
587 } 587 }
588 588
589 DCHECK_LE(range.start, range.end); 589 DCHECK_LE(range.start, range.end);
590 return range; 590 return range;
591 } 591 }
592 592
593 } // namespace cc 593 } // 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