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 = | 107 base::TimeDelta min_time = base::TimeDelta::Max(); |
108 base::TimeDelta::FromInternalValue(std::numeric_limits<int64>::max()); | |
109 | 108 |
110 bool is_solid_color = false; | 109 bool is_solid_color = false; |
111 for (int i = 0; i < rasterize_repeat_count_; ++i) { | 110 for (int i = 0; i < rasterize_repeat_count_; ++i) { |
112 SkBitmap bitmap; | 111 SkBitmap bitmap; |
113 bitmap.allocPixels(SkImageInfo::MakeN32Premul(content_rect.width(), | 112 bitmap.allocPixels(SkImageInfo::MakeN32Premul(content_rect.width(), |
114 content_rect.height())); | 113 content_rect.height())); |
115 SkCanvas canvas(bitmap); | 114 SkCanvas canvas(bitmap); |
116 PicturePileImpl::Analysis analysis; | 115 PicturePileImpl::Analysis analysis; |
117 | 116 |
118 base::TimeTicks start = Now(); | 117 base::TimeTicks start = Now(); |
(...skipping 25 matching lines...) Expand all Loading... |
144 pixels_rasterized_with_non_solid_color(0), | 143 pixels_rasterized_with_non_solid_color(0), |
145 pixels_rasterized_as_opaque(0), | 144 pixels_rasterized_as_opaque(0), |
146 total_layers(0), | 145 total_layers(0), |
147 total_picture_layers(0), | 146 total_picture_layers(0), |
148 total_picture_layers_with_no_content(0), | 147 total_picture_layers_with_no_content(0), |
149 total_picture_layers_off_screen(0) {} | 148 total_picture_layers_off_screen(0) {} |
150 | 149 |
151 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} | 150 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} |
152 | 151 |
153 } // namespace cc | 152 } // namespace cc |
OLD | NEW |