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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 NotifyDone(result.Pass()); | 189 NotifyDone(result.Pass()); |
190 } | 190 } |
191 | 191 |
192 void RasterizeAndRecordBenchmarkImpl::Run(LayerImpl* layer) { | 192 void RasterizeAndRecordBenchmarkImpl::Run(LayerImpl* layer) { |
193 rasterize_results_.total_layers++; | 193 rasterize_results_.total_layers++; |
194 layer->RunMicroBenchmark(this); | 194 layer->RunMicroBenchmark(this); |
195 } | 195 } |
196 | 196 |
197 void RasterizeAndRecordBenchmarkImpl::RunOnLayer(PictureLayerImpl* layer) { | 197 void RasterizeAndRecordBenchmarkImpl::RunOnLayer(PictureLayerImpl* layer) { |
198 rasterize_results_.total_picture_layers++; | 198 rasterize_results_.total_picture_layers++; |
199 if (!layer->DrawsContent()) { | 199 if (!layer->CanHaveTilings()) { |
200 rasterize_results_.total_picture_layers_with_no_content++; | 200 rasterize_results_.total_picture_layers_with_no_content++; |
201 return; | 201 return; |
202 } | 202 } |
203 if (layer->visible_content_rect().IsEmpty()) { | 203 if (layer->visible_content_rect().IsEmpty()) { |
204 rasterize_results_.total_picture_layers_off_screen++; | 204 rasterize_results_.total_picture_layers_off_screen++; |
205 return; | 205 return; |
206 } | 206 } |
207 | 207 |
208 TaskGraphRunner* task_graph_runner = RasterWorkerPool::GetTaskGraphRunner(); | 208 TaskGraphRunner* task_graph_runner = RasterWorkerPool::GetTaskGraphRunner(); |
209 DCHECK(task_graph_runner); | 209 DCHECK(task_graph_runner); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 pixels_rasterized_with_non_solid_color(0), | 270 pixels_rasterized_with_non_solid_color(0), |
271 pixels_rasterized_as_opaque(0), | 271 pixels_rasterized_as_opaque(0), |
272 total_layers(0), | 272 total_layers(0), |
273 total_picture_layers(0), | 273 total_picture_layers(0), |
274 total_picture_layers_with_no_content(0), | 274 total_picture_layers_with_no_content(0), |
275 total_picture_layers_off_screen(0) {} | 275 total_picture_layers_off_screen(0) {} |
276 | 276 |
277 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} | 277 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} |
278 | 278 |
279 } // namespace cc | 279 } // namespace cc |
OLD | NEW |