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

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: 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 float maximum_contents_scale_key) { 153 float maximum_contents_scale_key) {
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 tiling->Invalidate(layer_invalidation);
vmpstr 2016/11/23 02:08:52 Can you leave invalidate in the is active tree cas
sunnyps 2016/11/23 02:16:07 Done.
164 // We can commit on either active or pending trees, but only active one can 164 // Force |UpdateTilePriorities| on commit for cases where the compositor is
165 // have tiles at this point. 165 // heavily pipelined resulting in back to back draw and commit. This
166 if (tree_ == ACTIVE_TREE) { 166 // prevents the early out from |UpdateTilePriorities| because frame time
167 tiling->Invalidate(layer_invalidation); 167 // didn't change. That in turn causes an early out from PrepareTiles which
168 state_since_last_tile_priority_update_.invalidated = true; 168 // can cause checkerboarding.
169 } 169 state_since_last_tile_priority_update_.invalidated = true;
170 170
171 // This is needed for cases where the live tiles rect didn't change but 171 // 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 172 // recordings exist in the raster source that did not exist on the last
173 // raster source. 173 // raster source.
174 tiling->CreateMissingTilesInLiveTilesRect(); 174 tiling->CreateMissingTilesInLiveTilesRect();
175 } 175 }
176 VerifyTilings(nullptr /* pending_twin_set */); 176 VerifyTilings(nullptr /* pending_twin_set */);
177 } 177 }
178 178
179 void PictureLayerTilingSet::UpdateRasterSourceDueToLCDChange( 179 void PictureLayerTilingSet::UpdateRasterSourceDueToLCDChange(
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 case LOWER_THAN_LOW_RES: 778 case LOWER_THAN_LOW_RES:
779 range = TilingRange(low_res_range.end, tilings_size); 779 range = TilingRange(low_res_range.end, tilings_size);
780 break; 780 break;
781 } 781 }
782 782
783 DCHECK_LE(range.start, range.end); 783 DCHECK_LE(range.start, range.end);
784 return range; 784 return range;
785 } 785 }
786 786
787 } // namespace cc 787 } // 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