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

Side by Side Diff: cc/debug/picture_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
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/picture_record_benchmark.h" 5 #include "cc/debug/picture_record_benchmark.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue()); 74 scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
75 result->SetInteger("width", dimensions.first); 75 result->SetInteger("width", dimensions.first);
76 result->SetInteger("height", dimensions.second); 76 result->SetInteger("height", dimensions.second);
77 result->SetInteger("samples_count", total_count); 77 result->SetInteger("samples_count", total_count);
78 result->SetDouble("time_ms", average_time); 78 result->SetDouble("time_ms", average_time);
79 79
80 results->Append(result.release()); 80 results->Append(result.release());
81 } 81 }
82 82
83 NotifyDone(results.PassAs<base::Value>()); 83 NotifyDone(results.Pass());
84 } 84 }
85 85
86 void PictureRecordBenchmark::Run(Layer* layer) { 86 void PictureRecordBenchmark::Run(Layer* layer) {
87 layer->RunMicroBenchmark(this); 87 layer->RunMicroBenchmark(this);
88 } 88 }
89 89
90 void PictureRecordBenchmark::RunOnLayer(PictureLayer* layer) { 90 void PictureRecordBenchmark::RunOnLayer(PictureLayer* layer) {
91 ContentLayerClient* painter = layer->client(); 91 ContentLayerClient* painter = layer->client();
92 gfx::Size content_bounds = layer->content_bounds(); 92 gfx::Size content_bounds = layer->content_bounds();
93 93
(...skipping 23 matching lines...) Expand all
117 base::TimeDelta duration = end - start; 117 base::TimeDelta duration = end - start;
118 TotalTime& total_time = times_[dimensions]; 118 TotalTime& total_time = times_[dimensions];
119 total_time.first += duration; 119 total_time.first += duration;
120 total_time.second++; 120 total_time.second++;
121 } 121 }
122 } 122 }
123 } 123 }
124 } 124 }
125 125
126 } // namespace cc 126 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/micro_benchmark_controller_unittest.cc ('k') | cc/debug/rasterize_and_record_benchmark.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698