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

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

Issue 1133673004: cc: Heuristic for Renderer latency recovery (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 "base/time/time.h" 7 #include "base/time/time.h"
8 #include "cc/output/begin_frame_args.h" 8 #include "cc/output/begin_frame_args.h"
9 #include "ui/gfx/frame_time.h" 9 #include "ui/gfx/frame_time.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 BeginFrameArgs CreateBeginFrameArgsForTesting( 13 BeginFrameArgs CreateBeginFrameArgsForTesting(
14 BeginFrameArgs::CreationLocation location) { 14 BeginFrameArgs::CreationLocation location) {
15 return CreateBeginFrameArgsForTesting(location, gfx::FrameTime::Now()); 15 return CreateBeginFrameArgsForTesting(location, gfx::FrameTime::Now());
16 } 16 }
17 17
18 BeginFrameArgs CreateBeginFrameArgsForTesting( 18 BeginFrameArgs CreateBeginFrameArgsForTesting(
19 BeginFrameArgs::CreationLocation location, 19 BeginFrameArgs::CreationLocation location,
20 base::TimeTicks frame_time) { 20 base::TimeTicks frame_time) {
21 return BeginFrameArgs::Create( 21 return BeginFrameArgs::Create(
22 location, frame_time, 22 location, frame_time,
23 frame_time + (BeginFrameArgs::DefaultInterval() / 2), 23 frame_time + BeginFrameArgs::DefaultInterval() -
24 BeginFrameArgs::DefaultEstimatedParentDrawTime(),
brianderson 2015/05/08 16:52:50 I changed this because the non-zero threshold in S
24 BeginFrameArgs::DefaultInterval(), BeginFrameArgs::NORMAL); 25 BeginFrameArgs::DefaultInterval(), BeginFrameArgs::NORMAL);
25 } 26 }
26 27
27 BeginFrameArgs CreateBeginFrameArgsForTesting( 28 BeginFrameArgs CreateBeginFrameArgsForTesting(
28 BeginFrameArgs::CreationLocation location, 29 BeginFrameArgs::CreationLocation location,
29 int64 frame_time, 30 int64 frame_time,
30 int64 deadline, 31 int64 deadline,
31 int64 interval) { 32 int64 interval) {
32 return BeginFrameArgs::Create( 33 return BeginFrameArgs::Create(
33 location, base::TimeTicks::FromInternalValue(frame_time), 34 location, base::TimeTicks::FromInternalValue(frame_time),
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 85 }
85 86
86 void PrintTo(const BeginFrameArgs& args, ::std::ostream* os) { 87 void PrintTo(const BeginFrameArgs& args, ::std::ostream* os) {
87 *os << "BeginFrameArgs(" << BeginFrameArgs::TypeToString(args.type) << ", " 88 *os << "BeginFrameArgs(" << BeginFrameArgs::TypeToString(args.type) << ", "
88 << args.frame_time.ToInternalValue() << ", " 89 << args.frame_time.ToInternalValue() << ", "
89 << args.deadline.ToInternalValue() << ", " 90 << args.deadline.ToInternalValue() << ", "
90 << args.interval.InMicroseconds() << "us)"; 91 << args.interval.InMicroseconds() << "us)";
91 } 92 }
92 93
93 } // namespace cc 94 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698