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

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

Issue 1028333002: Chromium -> Mojo roll. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 218 }
219 219
220 timer.NextLap(); 220 timer.NextLap();
221 } while (!timer.HasTimeLimitExpired()); 221 } while (!timer.HasTimeLimitExpired());
222 base::TimeDelta duration = 222 base::TimeDelta duration =
223 base::TimeDelta::FromMillisecondsD(timer.MsPerLap()); 223 base::TimeDelta::FromMillisecondsD(timer.MsPerLap());
224 if (duration < min_time) 224 if (duration < min_time)
225 min_time = duration; 225 min_time = duration;
226 } 226 }
227 227
228 record_results_.bytes_used += memory_used; 228 if (mode_index == RecordingSource::RECORD_NORMALLY) {
229 record_results_.pixels_recorded += 229 record_results_.bytes_used += memory_used;
230 visible_content_rect.width() * visible_content_rect.height(); 230 record_results_.pixels_recorded +=
231 visible_content_rect.width() * visible_content_rect.height();
232 }
231 record_results_.total_best_time[mode_index] += min_time; 233 record_results_.total_best_time[mode_index] += min_time;
232 } 234 }
233 } 235 }
234 236
235 RasterizeAndRecordBenchmark::RecordResults::RecordResults() 237 RasterizeAndRecordBenchmark::RecordResults::RecordResults()
236 : pixels_recorded(0), bytes_used(0) { 238 : pixels_recorded(0), bytes_used(0) {
237 } 239 }
238 240
239 RasterizeAndRecordBenchmark::RecordResults::~RecordResults() {} 241 RasterizeAndRecordBenchmark::RecordResults::~RecordResults() {}
240 242
241 } // namespace cc 243 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/micro_benchmark_controller_unittest.cc ('k') | cc/input/top_controls_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698