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

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

Issue 2529533002: cc: Force update tile priorities for pending tree tiling set on commit. (Closed)
Patch Set: review Created 4 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 | « no previous file | cc/tiles/picture_layer_tiling_set_unittest.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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <set> 10 #include <set>
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 RemoveTilingsBelowScaleKey(minimum_contents_scale_key); 154 RemoveTilingsBelowScaleKey(minimum_contents_scale_key);
155 RemoveTilingsAboveScaleKey(maximum_contents_scale_key); 155 RemoveTilingsAboveScaleKey(maximum_contents_scale_key);
156 156
157 raster_source_ = raster_source; 157 raster_source_ = raster_source;
158 158
159 // Invalidate tiles and update them to the new raster source. 159 // Invalidate tiles and update them to the new raster source.
160 for (const std::unique_ptr<PictureLayerTiling>& tiling : tilings_) { 160 for (const std::unique_ptr<PictureLayerTiling>& tiling : tilings_) {
161 DCHECK(tree_ != PENDING_TREE || !tiling->has_tiles()); 161 DCHECK(tree_ != PENDING_TREE || !tiling->has_tiles());
162 tiling->SetRasterSourceAndResize(raster_source); 162 tiling->SetRasterSourceAndResize(raster_source);
163 163
164 // Force |UpdateTilePriorities| on commit for cases where the compositor is
165 // heavily pipelined resulting in back to back draw and commit. This
166 // prevents the early out from |UpdateTilePriorities| because frame time
167 // didn't change. That in turn causes an early out from PrepareTiles which
168 // can cause checkerboarding.
169 state_since_last_tile_priority_update_.invalidated = true;
170
164 // We can commit on either active or pending trees, but only active one can 171 // We can commit on either active or pending trees, but only active one can
165 // have tiles at this point. 172 // have tiles at this point.
166 if (tree_ == ACTIVE_TREE) { 173 if (tree_ == ACTIVE_TREE)
167 tiling->Invalidate(layer_invalidation); 174 tiling->Invalidate(layer_invalidation);
168 state_since_last_tile_priority_update_.invalidated = true;
169 }
170 175
171 // This is needed for cases where the live tiles rect didn't change but 176 // This is needed for cases where the live tiles rect didn't change but
172 // recordings exist in the raster source that did not exist on the last 177 // recordings exist in the raster source that did not exist on the last
173 // raster source. 178 // raster source.
174 tiling->CreateMissingTilesInLiveTilesRect(); 179 tiling->CreateMissingTilesInLiveTilesRect();
175 } 180 }
176 VerifyTilings(nullptr /* pending_twin_set */); 181 VerifyTilings(nullptr /* pending_twin_set */);
177 } 182 }
178 183
179 void PictureLayerTilingSet::UpdateRasterSourceDueToLCDChange( 184 void PictureLayerTilingSet::UpdateRasterSourceDueToLCDChange(
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 case LOWER_THAN_LOW_RES: 783 case LOWER_THAN_LOW_RES:
779 range = TilingRange(low_res_range.end, tilings_size); 784 range = TilingRange(low_res_range.end, tilings_size);
780 break; 785 break;
781 } 786 }
782 787
783 DCHECK_LE(range.start, range.end); 788 DCHECK_LE(range.start, range.end);
784 return range; 789 return range;
785 } 790 }
786 791
787 } // namespace cc 792 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/tiles/picture_layer_tiling_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698