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

Side by Side Diff: cc/test/begin_frame_args_test.cc

Issue 1539203002: Switch to standard integer types in cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more includes Created 5 years 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/test/begin_frame_args_test.h ('k') | cc/test/begin_frame_source_test.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/begin_frame_args_test.h" 5 #include "cc/test/begin_frame_args_test.h"
6 6
7 #include <stdint.h>
8
7 #include "base/time/time.h" 9 #include "base/time/time.h"
8 #include "cc/output/begin_frame_args.h" 10 #include "cc/output/begin_frame_args.h"
9 11
10 namespace cc { 12 namespace cc {
11 13
12 BeginFrameArgs CreateBeginFrameArgsForTesting( 14 BeginFrameArgs CreateBeginFrameArgsForTesting(
13 BeginFrameArgs::CreationLocation location) { 15 BeginFrameArgs::CreationLocation location) {
14 return CreateBeginFrameArgsForTesting(location, base::TimeTicks::Now()); 16 return CreateBeginFrameArgsForTesting(location, base::TimeTicks::Now());
15 } 17 }
16 18
17 BeginFrameArgs CreateBeginFrameArgsForTesting( 19 BeginFrameArgs CreateBeginFrameArgsForTesting(
18 BeginFrameArgs::CreationLocation location, 20 BeginFrameArgs::CreationLocation location,
19 base::TimeTicks frame_time) { 21 base::TimeTicks frame_time) {
20 return BeginFrameArgs::Create( 22 return BeginFrameArgs::Create(
21 location, frame_time, 23 location, frame_time,
22 frame_time + BeginFrameArgs::DefaultInterval() - 24 frame_time + BeginFrameArgs::DefaultInterval() -
23 BeginFrameArgs::DefaultEstimatedParentDrawTime(), 25 BeginFrameArgs::DefaultEstimatedParentDrawTime(),
24 BeginFrameArgs::DefaultInterval(), BeginFrameArgs::NORMAL); 26 BeginFrameArgs::DefaultInterval(), BeginFrameArgs::NORMAL);
25 } 27 }
26 28
27 BeginFrameArgs CreateBeginFrameArgsForTesting( 29 BeginFrameArgs CreateBeginFrameArgsForTesting(
28 BeginFrameArgs::CreationLocation location, 30 BeginFrameArgs::CreationLocation location,
29 int64 frame_time, 31 int64_t frame_time,
30 int64 deadline, 32 int64_t deadline,
31 int64 interval) { 33 int64_t interval) {
32 return BeginFrameArgs::Create( 34 return BeginFrameArgs::Create(
33 location, base::TimeTicks::FromInternalValue(frame_time), 35 location, base::TimeTicks::FromInternalValue(frame_time),
34 base::TimeTicks::FromInternalValue(deadline), 36 base::TimeTicks::FromInternalValue(deadline),
35 base::TimeDelta::FromInternalValue(interval), BeginFrameArgs::NORMAL); 37 base::TimeDelta::FromInternalValue(interval), BeginFrameArgs::NORMAL);
36 } 38 }
37 39
38 BeginFrameArgs CreateBeginFrameArgsForTesting( 40 BeginFrameArgs CreateBeginFrameArgsForTesting(
39 BeginFrameArgs::CreationLocation location, 41 BeginFrameArgs::CreationLocation location,
40 int64 frame_time, 42 int64_t frame_time,
41 int64 deadline, 43 int64_t deadline,
42 int64 interval, 44 int64_t interval,
43 BeginFrameArgs::BeginFrameArgsType type) { 45 BeginFrameArgs::BeginFrameArgsType type) {
44 return BeginFrameArgs::Create( 46 return BeginFrameArgs::Create(
45 location, base::TimeTicks::FromInternalValue(frame_time), 47 location, base::TimeTicks::FromInternalValue(frame_time),
46 base::TimeTicks::FromInternalValue(deadline), 48 base::TimeTicks::FromInternalValue(deadline),
47 base::TimeDelta::FromInternalValue(interval), type); 49 base::TimeDelta::FromInternalValue(interval), type);
48 } 50 }
49 51
50 BeginFrameArgs CreateBeginFrameArgsForTesting( 52 BeginFrameArgs CreateBeginFrameArgsForTesting(
51 BeginFrameArgs::CreationLocation location, 53 BeginFrameArgs::CreationLocation location,
52 base::SimpleTestTickClock* now_src) { 54 base::SimpleTestTickClock* now_src) {
(...skipping 15 matching lines...) Expand all
68 } 70 }
69 71
70 void PrintTo(const BeginFrameArgs& args, ::std::ostream* os) { 72 void PrintTo(const BeginFrameArgs& args, ::std::ostream* os) {
71 *os << "BeginFrameArgs(" << BeginFrameArgs::TypeToString(args.type) << ", " 73 *os << "BeginFrameArgs(" << BeginFrameArgs::TypeToString(args.type) << ", "
72 << args.frame_time.ToInternalValue() << ", " 74 << args.frame_time.ToInternalValue() << ", "
73 << args.deadline.ToInternalValue() << ", " 75 << args.deadline.ToInternalValue() << ", "
74 << args.interval.InMicroseconds() << "us)"; 76 << args.interval.InMicroseconds() << "us)";
75 } 77 }
76 78
77 } // namespace cc 79 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/begin_frame_args_test.h ('k') | cc/test/begin_frame_source_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698