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

Side by Side Diff: cc/output/begin_frame_args.h

Issue 17391006: cc: Add BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 years, 6 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
« no previous file with comments | « cc/cc.gyp ('k') | cc/output/begin_frame_args.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_OUTPUT_BEGIN_FRAME_H_
6 #define CC_OUTPUT_BEGIN_FRAME_H_
7
8 #include "base/time.h"
9 #include "cc/base/cc_export.h"
10
11 namespace cc {
12
13 struct CC_EXPORT BeginFrameArgs {
14 // Creates an invalid set of values.
15 BeginFrameArgs();
16
17 // You should be able to find all instances where a BeginFrame has been
18 // created by searching for "BeginFrameArgs::Create".
19 static BeginFrameArgs Create(base::TimeTicks frame_time,
20 base::TimeTicks deadline,
21 base::TimeDelta interval);
22 static BeginFrameArgs CreateForSynchronousCompositor();
23 static BeginFrameArgs CreateForTesting();
24
25 // This is the default delta that will be used to adjust the deadline when
26 // proper draw-time estimations are not yet available.
27 static base::TimeDelta DefaultDeadlineAdjustment();
28
29 // This is the default interval to use to avoid sprinkling the code with
30 // magic numbers.
31 static base::TimeDelta DefaultInterval();
32
33 bool IsInvalid() const {
34 return interval < base::TimeDelta();
35 }
36
37 base::TimeTicks frame_time;
38 base::TimeTicks deadline;
39 base::TimeDelta interval;
40
41 private:
42 BeginFrameArgs(base::TimeTicks frame_time,
43 base::TimeTicks deadline,
44 base::TimeDelta interval);
45 };
46
47 } // namespace cc
48
49 #endif // CC_OUTPUT_BEGIN_FRAME_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/output/begin_frame_args.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698