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

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

Issue 279183002: Use LapTimer in rasterize_and_record micro benchmark. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add CC_EXPORT to LapTimer class. Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/debug/lap_timer.h ('k') | cc/debug/rasterize_and_record_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/test/lap_timer.h" 5 #include "cc/debug/lap_timer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
11 namespace { 11 namespace {
12 12
13 base::TimeTicks Now() { 13 base::TimeTicks Now() {
14 return base::TimeTicks::IsThreadNowSupported() 14 return base::TimeTicks::IsThreadNowSupported()
15 ? base::TimeTicks::ThreadNow() 15 ? base::TimeTicks::ThreadNow()
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 72 }
73 73
74 float LapTimer::LapsPerSecond() { 74 float LapTimer::LapsPerSecond() {
75 DCHECK(HasTimedAllLaps()); 75 DCHECK(HasTimedAllLaps());
76 return num_laps_ / accumulator_.InSecondsF(); 76 return num_laps_ / accumulator_.InSecondsF();
77 } 77 }
78 78
79 int LapTimer::NumLaps() { return num_laps_; } 79 int LapTimer::NumLaps() { return num_laps_; }
80 80
81 } // namespace cc 81 } // namespace cc
OLDNEW
« no previous file with comments | « cc/debug/lap_timer.h ('k') | cc/debug/rasterize_and_record_benchmark.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698