Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: cc/debug/rasterize_and_record_benchmark_impl.cc

Issue 609663003: cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cc-passas: PassAs-presubmit-warning Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark.cc ('k') | cc/debug/unittest_only_benchmark.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 result->SetInteger("pixels_rasterized_as_opaque", 177 result->SetInteger("pixels_rasterized_as_opaque",
178 rasterize_results_.pixels_rasterized_as_opaque); 178 rasterize_results_.pixels_rasterized_as_opaque);
179 result->SetInteger("total_layers", rasterize_results_.total_layers); 179 result->SetInteger("total_layers", rasterize_results_.total_layers);
180 result->SetInteger("total_picture_layers", 180 result->SetInteger("total_picture_layers",
181 rasterize_results_.total_picture_layers); 181 rasterize_results_.total_picture_layers);
182 result->SetInteger("total_picture_layers_with_no_content", 182 result->SetInteger("total_picture_layers_with_no_content",
183 rasterize_results_.total_picture_layers_with_no_content); 183 rasterize_results_.total_picture_layers_with_no_content);
184 result->SetInteger("total_picture_layers_off_screen", 184 result->SetInteger("total_picture_layers_off_screen",
185 rasterize_results_.total_picture_layers_off_screen); 185 rasterize_results_.total_picture_layers_off_screen);
186 186
187 NotifyDone(result.PassAs<base::Value>()); 187 NotifyDone(result.Pass());
188 } 188 }
189 189
190 void RasterizeAndRecordBenchmarkImpl::Run(LayerImpl* layer) { 190 void RasterizeAndRecordBenchmarkImpl::Run(LayerImpl* layer) {
191 rasterize_results_.total_layers++; 191 rasterize_results_.total_layers++;
192 layer->RunMicroBenchmark(this); 192 layer->RunMicroBenchmark(this);
193 } 193 }
194 194
195 void RasterizeAndRecordBenchmarkImpl::RunOnLayer(PictureLayerImpl* layer) { 195 void RasterizeAndRecordBenchmarkImpl::RunOnLayer(PictureLayerImpl* layer) {
196 rasterize_results_.total_picture_layers++; 196 rasterize_results_.total_picture_layers++;
197 if (!layer->DrawsContent()) { 197 if (!layer->DrawsContent()) {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 pixels_rasterized_with_non_solid_color(0), 267 pixels_rasterized_with_non_solid_color(0),
268 pixels_rasterized_as_opaque(0), 268 pixels_rasterized_as_opaque(0),
269 total_layers(0), 269 total_layers(0),
270 total_picture_layers(0), 270 total_picture_layers(0),
271 total_picture_layers_with_no_content(0), 271 total_picture_layers_with_no_content(0),
272 total_picture_layers_off_screen(0) {} 272 total_picture_layers_off_screen(0) {}
273 273
274 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} 274 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {}
275 275
276 } // namespace cc 276 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark.cc ('k') | cc/debug/unittest_only_benchmark.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698