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

Side by Side Diff: cc/debug/rasterize_and_record_benchmark.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/picture_record_benchmark.cc ('k') | cc/debug/rasterize_and_record_benchmark_impl.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.h" 5 #include "cc/debug/rasterize_and_record_benchmark.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 void RasterizeAndRecordBenchmark::RecordRasterResults( 73 void RasterizeAndRecordBenchmark::RecordRasterResults(
74 scoped_ptr<base::Value> results_value) { 74 scoped_ptr<base::Value> results_value) {
75 DCHECK(main_thread_benchmark_done_); 75 DCHECK(main_thread_benchmark_done_);
76 76
77 base::DictionaryValue* results = NULL; 77 base::DictionaryValue* results = NULL;
78 results_value->GetAsDictionary(&results); 78 results_value->GetAsDictionary(&results);
79 DCHECK(results); 79 DCHECK(results);
80 80
81 results_->MergeDictionary(results); 81 results_->MergeDictionary(results);
82 82
83 NotifyDone(results_.PassAs<base::Value>()); 83 NotifyDone(results_.Pass());
84 } 84 }
85 85
86 scoped_ptr<MicroBenchmarkImpl> RasterizeAndRecordBenchmark::CreateBenchmarkImpl( 86 scoped_ptr<MicroBenchmarkImpl> RasterizeAndRecordBenchmark::CreateBenchmarkImpl(
87 scoped_refptr<base::MessageLoopProxy> origin_loop) { 87 scoped_refptr<base::MessageLoopProxy> origin_loop) {
88 return scoped_ptr<MicroBenchmarkImpl>(new RasterizeAndRecordBenchmarkImpl( 88 return make_scoped_ptr(new RasterizeAndRecordBenchmarkImpl(
89 origin_loop, 89 origin_loop,
90 settings_.get(), 90 settings_.get(),
91 base::Bind(&RasterizeAndRecordBenchmark::RecordRasterResults, 91 base::Bind(&RasterizeAndRecordBenchmark::RecordRasterResults,
92 weak_ptr_factory_.GetWeakPtr()))); 92 weak_ptr_factory_.GetWeakPtr())));
93 } 93 }
94 94
95 void RasterizeAndRecordBenchmark::Run(Layer* layer) { 95 void RasterizeAndRecordBenchmark::Run(Layer* layer) {
96 layer->RunMicroBenchmark(this); 96 layer->RunMicroBenchmark(this);
97 } 97 }
98 98
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 record_results_.total_best_time[mode_index] += min_time; 146 record_results_.total_best_time[mode_index] += min_time;
147 } 147 }
148 } 148 }
149 149
150 RasterizeAndRecordBenchmark::RecordResults::RecordResults() 150 RasterizeAndRecordBenchmark::RecordResults::RecordResults()
151 : pixels_recorded(0) {} 151 : pixels_recorded(0) {}
152 152
153 RasterizeAndRecordBenchmark::RecordResults::~RecordResults() {} 153 RasterizeAndRecordBenchmark::RecordResults::~RecordResults() {}
154 154
155 } // namespace cc 155 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/picture_record_benchmark.cc ('k') | cc/debug/rasterize_and_record_benchmark_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698