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

Side by Side Diff: cc/playback/raster_source.cc

Issue 2555363004: [6/6] git cl format (Closed)
Patch Set: Created 4 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
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/test/fake_picture_layer_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/playback/raster_source.h" 5 #include "cc/playback/raster_source.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 return 0; 216 return 0;
217 return display_list_->ApproximateMemoryUsage() + 217 return display_list_->ApproximateMemoryUsage() +
218 painter_reported_memory_usage_; 218 painter_reported_memory_usage_;
219 } 219 }
220 220
221 bool RasterSource::PerformSolidColorAnalysis(const gfx::Rect& content_rect, 221 bool RasterSource::PerformSolidColorAnalysis(const gfx::Rect& content_rect,
222 float raster_scale, 222 float raster_scale,
223 SkColor* color) const { 223 SkColor* color) const {
224 TRACE_EVENT0("cc", "RasterSource::PerformSolidColorAnalysis"); 224 TRACE_EVENT0("cc", "RasterSource::PerformSolidColorAnalysis");
225 225
226 gfx::Rect layer_rect = gfx::ScaleToEnclosingRect( 226 gfx::Rect layer_rect =
227 content_rect, 1.f / raster_scale); 227 gfx::ScaleToEnclosingRect(content_rect, 1.f / raster_scale);
228 228
229 layer_rect.Intersect(gfx::Rect(size_)); 229 layer_rect.Intersect(gfx::Rect(size_));
230 skia::AnalysisCanvas canvas(layer_rect.width(), layer_rect.height()); 230 skia::AnalysisCanvas canvas(layer_rect.width(), layer_rect.height());
231 canvas.translate(-layer_rect.x(), -layer_rect.y()); 231 canvas.translate(-layer_rect.x(), -layer_rect.y());
232 RasterCommon(&canvas, &canvas); 232 RasterCommon(&canvas, &canvas);
233 return canvas.GetColorIfSolid(color); 233 return canvas.GetColorIfSolid(color);
234 } 234 }
235 235
236 void RasterSource::GetDiscardableImagesInRect( 236 void RasterSource::GetDiscardableImagesInRect(
237 const gfx::Rect& layer_rect, 237 const gfx::Rect& layer_rect,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 bool can_use_lcd_text = false; 304 bool can_use_lcd_text = false;
305 return scoped_refptr<RasterSource>(new RasterSource(this, can_use_lcd_text)); 305 return scoped_refptr<RasterSource>(new RasterSource(this, can_use_lcd_text));
306 } 306 }
307 307
308 RasterSource::PlaybackSettings::PlaybackSettings() 308 RasterSource::PlaybackSettings::PlaybackSettings()
309 : playback_to_shared_canvas(false), 309 : playback_to_shared_canvas(false),
310 skip_images(false), 310 skip_images(false),
311 use_image_hijack_canvas(true) {} 311 use_image_hijack_canvas(true) {}
312 312
313 } // namespace cc 313 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/test/fake_picture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698