OLD | NEW |
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 "base/debug/trace_event.h" | 5 #include "base/debug/trace_event.h" |
6 #include "cc/debug_colors.h" | 6 #include "cc/debug_colors.h" |
7 #include "cc/picture_pile_impl.h" | 7 #include "cc/picture_pile_impl.h" |
8 #include "cc/region.h" | 8 #include "cc/region.h" |
9 #include "cc/rendering_stats.h" | 9 #include "cc/rendering_stats.h" |
10 #include "skia/ext/analysis_canvas.h" | 10 #include "skia/ext/analysis_canvas.h" |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 content_rect.height()); | 227 content_rect.height()); |
228 skia::AnalysisDevice device(emptyBitmap); | 228 skia::AnalysisDevice device(emptyBitmap); |
229 skia::AnalysisCanvas canvas(&device); | 229 skia::AnalysisCanvas canvas(&device); |
230 | 230 |
231 int64 total_pixels_rasterized = 0; | 231 int64 total_pixels_rasterized = 0; |
232 Raster(&canvas, content_rect, contents_scale, &total_pixels_rasterized); | 232 Raster(&canvas, content_rect, contents_scale, &total_pixels_rasterized); |
233 | 233 |
234 analysis->is_transparent = canvas.isTransparent(); | 234 analysis->is_transparent = canvas.isTransparent(); |
235 analysis->is_solid_color = canvas.getColorIfSolid(&analysis->solid_color); | 235 analysis->is_solid_color = canvas.getColorIfSolid(&analysis->solid_color); |
236 analysis->is_cheap_to_raster = canvas.isCheap(); | 236 analysis->is_cheap_to_raster = canvas.isCheap(); |
| 237 canvas.consumeLazyPixelRefs(analysis->lazy_pixel_refs); |
237 } | 238 } |
238 | 239 |
239 PicturePileImpl::Analysis::Analysis() : | 240 PicturePileImpl::Analysis::Analysis() : |
240 is_solid_color(false), | 241 is_solid_color(false), |
241 is_transparent(false), | 242 is_transparent(false), |
242 is_cheap_to_raster(false) { | 243 is_cheap_to_raster(false) { |
243 } | 244 } |
244 | 245 |
245 } // namespace cc | 246 } // namespace cc |
OLD | NEW |