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

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

Issue 832963002: Revert of cc: Remove tile and scale specific code from raster source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_pile.h ('k') | cc/resources/picture_pile_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/resources/picture_pile.h" 5 #include "cc/resources/picture_pile.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 return; 150 return;
151 } 151 }
152 152
153 *record_rects = vertical_clustering; 153 *record_rects = vertical_clustering;
154 } 154 }
155 155
156 } // namespace 156 } // namespace
157 157
158 namespace cc { 158 namespace cc {
159 159
160 PicturePile::PicturePile(float min_contents_scale, 160 PicturePile::PicturePile()
161 const gfx::Size& tile_grid_size)
162 : min_contents_scale_(0), 161 : min_contents_scale_(0),
163 slow_down_raster_scale_factor_for_debug_(0), 162 slow_down_raster_scale_factor_for_debug_(0),
164 can_use_lcd_text_(true), 163 can_use_lcd_text_(true),
165 has_any_recordings_(false), 164 has_any_recordings_(false),
166 is_solid_color_(false), 165 is_solid_color_(false),
167 solid_color_(SK_ColorTRANSPARENT), 166 solid_color_(SK_ColorTRANSPARENT),
168 pixel_record_distance_(kPixelDistanceToRecord), 167 pixel_record_distance_(kPixelDistanceToRecord),
169 is_suitable_for_gpu_rasterization_(true) { 168 is_suitable_for_gpu_rasterization_(true) {
170 tiling_.SetMaxTextureSize(gfx::Size(kBasePictureSize, kBasePictureSize)); 169 tiling_.SetMaxTextureSize(gfx::Size(kBasePictureSize, kBasePictureSize));
171 170 tile_grid_info_.fTileInterval.setEmpty();
172 SetMinContentsScale(min_contents_scale); 171 tile_grid_info_.fMargin.setEmpty();
173 SetTileGridSize(tile_grid_size); 172 tile_grid_info_.fOffset.setZero();
174 } 173 }
175 174
176 PicturePile::~PicturePile() { 175 PicturePile::~PicturePile() {
177 } 176 }
178 177
179 bool PicturePile::UpdateAndExpandInvalidation( 178 bool PicturePile::UpdateAndExpandInvalidation(
180 ContentLayerClient* painter, 179 ContentLayerClient* painter,
181 Region* invalidation, 180 Region* invalidation,
182 bool can_use_lcd_text, 181 bool can_use_lcd_text,
183 const gfx::Size& layer_size, 182 const gfx::Size& layer_size,
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 const Picture* PicturePile::PictureInfo::GetPicture() const { 772 const Picture* PicturePile::PictureInfo::GetPicture() const {
774 return picture_.get(); 773 return picture_.get();
775 } 774 }
776 775
777 float PicturePile::PictureInfo::GetInvalidationFrequency() const { 776 float PicturePile::PictureInfo::GetInvalidationFrequency() const {
778 return invalidation_history_.count() / 777 return invalidation_history_.count() /
779 static_cast<float>(INVALIDATION_FRAMES_TRACKED); 778 static_cast<float>(INVALIDATION_FRAMES_TRACKED);
780 } 779 }
781 780
782 } // namespace cc 781 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_pile.h ('k') | cc/resources/picture_pile_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698