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

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

Issue 874613003: cc: Stop pushing properties every activation for picture layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pli-pushprops: fixscrolling Created 5 years, 11 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/resources/picture_layer_tiling.cc ('k') | cc/test/fake_picture_layer_tiling_client.h » ('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/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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 for (size_t i = 0; i < tilings_.size(); ++i) { 201 for (size_t i = 0; i < tilings_.size(); ++i) {
202 DCHECK_NE(tilings_[i]->contents_scale(), contents_scale); 202 DCHECK_NE(tilings_[i]->contents_scale(), contents_scale);
203 DCHECK_EQ(tilings_[i]->raster_source(), raster_source.get()); 203 DCHECK_EQ(tilings_[i]->raster_source(), raster_source.get());
204 } 204 }
205 205
206 tilings_.push_back(PictureLayerTiling::Create( 206 tilings_.push_back(PictureLayerTiling::Create(
207 contents_scale, raster_source, client_, max_tiles_for_interest_area_, 207 contents_scale, raster_source, client_, max_tiles_for_interest_area_,
208 skewport_target_time_in_seconds_, 208 skewport_target_time_in_seconds_,
209 skewport_extrapolation_limit_in_content_pixels_)); 209 skewport_extrapolation_limit_in_content_pixels_));
210 PictureLayerTiling* appended = tilings_.back(); 210 PictureLayerTiling* appended = tilings_.back();
211
212 tilings_.sort(LargestToSmallestScaleFunctor()); 211 tilings_.sort(LargestToSmallestScaleFunctor());
213 return appended; 212 return appended;
214 } 213 }
215 214
216 int PictureLayerTilingSet::NumHighResTilings() const { 215 int PictureLayerTilingSet::NumHighResTilings() const {
217 int num_high_res = 0; 216 int num_high_res = 0;
218 for (size_t i = 0; i < tilings_.size(); ++i) { 217 for (size_t i = 0; i < tilings_.size(); ++i) {
219 if (tilings_[i]->resolution() == HIGH_RESOLUTION) 218 if (tilings_[i]->resolution() == HIGH_RESOLUTION)
220 num_high_res++; 219 num_high_res++;
221 } 220 }
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 case LOWER_THAN_LOW_RES: 535 case LOWER_THAN_LOW_RES:
537 range = TilingRange(low_res_range.end, tilings_.size()); 536 range = TilingRange(low_res_range.end, tilings_.size());
538 break; 537 break;
539 } 538 }
540 539
541 DCHECK_LE(range.start, range.end); 540 DCHECK_LE(range.start, range.end);
542 return range; 541 return range;
543 } 542 }
544 543
545 } // namespace cc 544 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | cc/test/fake_picture_layer_tiling_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698