| OLD | NEW | 
|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/debug/rasterize_and_record_benchmark_impl.h" | 5 #include "cc/debug/rasterize_and_record_benchmark_impl.h" | 
| 6 | 6 | 
| 7 #include <algorithm> | 7 #include <algorithm> | 
| 8 #include <limits> | 8 #include <limits> | 
| 9 | 9 | 
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" | 
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 97        it; | 97        it; | 
| 98        ++it) { | 98        ++it) { | 
| 99     DCHECK(*it); | 99     DCHECK(*it); | 
| 100 | 100 | 
| 101     PicturePileImpl* picture_pile = (*it)->picture_pile(); | 101     PicturePileImpl* picture_pile = (*it)->picture_pile(); | 
| 102     gfx::Rect content_rect = (*it)->content_rect(); | 102     gfx::Rect content_rect = (*it)->content_rect(); | 
| 103     float contents_scale = (*it)->contents_scale(); | 103     float contents_scale = (*it)->contents_scale(); | 
| 104 | 104 | 
| 105     int tile_size = content_rect.width() * content_rect.height(); | 105     int tile_size = content_rect.width() * content_rect.height(); | 
| 106 | 106 | 
| 107     base::TimeDelta min_time = base::TimeDelta::Max(); | 107     base::TimeDelta min_time = | 
|  | 108         base::TimeDelta::FromInternalValue(std::numeric_limits<int64>::max()); | 
| 108 | 109 | 
| 109     bool is_solid_color = false; | 110     bool is_solid_color = false; | 
| 110     for (int i = 0; i < rasterize_repeat_count_; ++i) { | 111     for (int i = 0; i < rasterize_repeat_count_; ++i) { | 
| 111       SkBitmap bitmap; | 112       SkBitmap bitmap; | 
| 112       bitmap.allocPixels(SkImageInfo::MakeN32Premul(content_rect.width(), | 113       bitmap.allocPixels(SkImageInfo::MakeN32Premul(content_rect.width(), | 
| 113                                                     content_rect.height())); | 114                                                     content_rect.height())); | 
| 114       SkCanvas canvas(bitmap); | 115       SkCanvas canvas(bitmap); | 
| 115       PicturePileImpl::Analysis analysis; | 116       PicturePileImpl::Analysis analysis; | 
| 116 | 117 | 
| 117       base::TimeTicks start = Now(); | 118       base::TimeTicks start = Now(); | 
| (...skipping 25 matching lines...) Expand all  Loading... | 
| 143       pixels_rasterized_with_non_solid_color(0), | 144       pixels_rasterized_with_non_solid_color(0), | 
| 144       pixels_rasterized_as_opaque(0), | 145       pixels_rasterized_as_opaque(0), | 
| 145       total_layers(0), | 146       total_layers(0), | 
| 146       total_picture_layers(0), | 147       total_picture_layers(0), | 
| 147       total_picture_layers_with_no_content(0), | 148       total_picture_layers_with_no_content(0), | 
| 148       total_picture_layers_off_screen(0) {} | 149       total_picture_layers_off_screen(0) {} | 
| 149 | 150 | 
| 150 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} | 151 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} | 
| 151 | 152 | 
| 152 }  // namespace cc | 153 }  // namespace cc | 
| OLD | NEW | 
|---|