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

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

Issue 799463005: cc: Mirror LiveTilesRect and tiles between active and recycled trees. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: noswap-ltr: withcheck Created 6 years 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
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 // For unshared tilings, invalidate tiles and update them to the new raster 84 // For unshared tilings, invalidate tiles and update them to the new raster
85 // source. 85 // source.
86 for (PictureLayerTiling* tiling : tilings_) { 86 for (PictureLayerTiling* tiling : tilings_) {
87 if (twin_set && twin_set->FindTilingWithScale(tiling->contents_scale())) 87 if (twin_set && twin_set->FindTilingWithScale(tiling->contents_scale()))
88 continue; 88 continue;
89 89
90 tiling->Resize(layer_bounds); 90 tiling->Resize(layer_bounds);
91 tiling->Invalidate(layer_invalidation); 91 tiling->Invalidate(layer_invalidation);
92 tiling->SetRasterSource(raster_source); 92 tiling->SetRasterSource(raster_source);
93 // TODO(danakj): Is this needed anymore? Won't they already exist? 93 // This is needed for cases where the live tiles rect didn't change but
94 // recordings exist in the raster source that did not exist on the last
95 // raster source.
94 tiling->CreateMissingTilesInLiveTilesRect(); 96 tiling->CreateMissingTilesInLiveTilesRect();
95 97
96 // If |twin_set| is present, use the resolutions from there. Otherwise leave 98 // If |twin_set| is present, use the resolutions from there. Otherwise leave
97 // all resolutions as they are. 99 // all resolutions as they are.
98 if (twin_set) 100 if (twin_set)
99 tiling->set_resolution(NON_IDEAL_RESOLUTION); 101 tiling->set_resolution(NON_IDEAL_RESOLUTION);
100 } 102 }
101 103
102 tilings_.sort(LargestToSmallestScaleFunctor()); 104 tilings_.sort(LargestToSmallestScaleFunctor());
103 105
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 case LOWER_THAN_LOW_RES: 601 case LOWER_THAN_LOW_RES:
600 range = TilingRange(low_res_range.end, tilings_.size()); 602 range = TilingRange(low_res_range.end, tilings_.size());
601 break; 603 break;
602 } 604 }
603 605
604 DCHECK_LE(range.start, range.end); 606 DCHECK_LE(range.start, range.end);
605 return range; 607 return range;
606 } 608 }
607 609
608 } // namespace cc 610 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698