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.setConfig(SkBitmap::kARGB_8888_Config, | 113 bitmap.setConfig(SkBitmap::kARGB_8888_Config, |
113 content_rect.width(), | 114 content_rect.width(), |
114 content_rect.height()); | 115 content_rect.height()); |
115 bitmap.allocPixels(); | 116 bitmap.allocPixels(); |
116 | 117 |
117 SkBitmapDevice device(bitmap); | 118 SkBitmapDevice device(bitmap); |
(...skipping 29 matching lines...) Expand all Loading... |
147 pixels_rasterized_with_non_solid_color(0), | 148 pixels_rasterized_with_non_solid_color(0), |
148 pixels_rasterized_as_opaque(0), | 149 pixels_rasterized_as_opaque(0), |
149 total_layers(0), | 150 total_layers(0), |
150 total_picture_layers(0), | 151 total_picture_layers(0), |
151 total_picture_layers_with_no_content(0), | 152 total_picture_layers_with_no_content(0), |
152 total_picture_layers_off_screen(0) {} | 153 total_picture_layers_off_screen(0) {} |
153 | 154 |
154 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} | 155 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} |
155 | 156 |
156 } // namespace cc | 157 } // namespace cc |
OLD | NEW |