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

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

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/layers/ui_resource_layer_unittest.cc ('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
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 #ifndef CC_OUTPUT_BEGIN_FRAME_ARGS_H_ 5 #ifndef CC_OUTPUT_BEGIN_FRAME_ARGS_H_
6 #define CC_OUTPUT_BEGIN_FRAME_ARGS_H_ 6 #define CC_OUTPUT_BEGIN_FRAME_ARGS_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 12
13 namespace base { 13 namespace base {
14 namespace debug { 14 namespace debug {
15 class ConvertableToTraceFormat; 15 class ConvertableToTraceFormat;
16 class TracedValue; 16 class TracedValue;
17 } 17 }
18 } 18 }
19 19
20 namespace cc { 20 namespace cc {
21 21
22 struct CC_EXPORT BeginFrameArgs { 22 struct CC_EXPORT BeginFrameArgs {
23 enum BeginFrameArgsType { 23 enum BeginFrameArgsType {
24 INVALID, 24 INVALID,
25 NORMAL, 25 NORMAL,
26 SYNCHRONOUS, 26 SYNCHRONOUS,
27 MISSED, 27 MISSED,
28 }; 28 };
29 static const char* TypeToString(BeginFrameArgsType type);
29 30
30 // Creates an invalid set of values. 31 // Creates an invalid set of values.
31 BeginFrameArgs(); 32 BeginFrameArgs();
32 33
33 // You should be able to find all instances where a BeginFrame has been 34 // You should be able to find all instances where a BeginFrame has been
34 // created by searching for "BeginFrameArgs::Create". 35 // created by searching for "BeginFrameArgs::Create".
35 static BeginFrameArgs Create(base::TimeTicks frame_time, 36 static BeginFrameArgs Create(base::TimeTicks frame_time,
36 base::TimeTicks deadline, 37 base::TimeTicks deadline,
37 base::TimeDelta interval); 38 base::TimeDelta interval,
38 static BeginFrameArgs CreateTyped(base::TimeTicks frame_time, 39 BeginFrameArgsType type);
39 base::TimeTicks deadline,
40 base::TimeDelta interval,
41 BeginFrameArgsType type);
42 static BeginFrameArgs CreateForSynchronousCompositor(
43 base::TimeTicks now = base::TimeTicks());
44 40
45 // This is the default delta that will be used to adjust the deadline when 41 // This is the default delta that will be used to adjust the deadline when
46 // proper draw-time estimations are not yet available. 42 // proper draw-time estimations are not yet available.
47 static base::TimeDelta DefaultEstimatedParentDrawTime(); 43 static base::TimeDelta DefaultEstimatedParentDrawTime();
48 44
49 // This is the default interval to use to avoid sprinkling the code with 45 // This is the default interval to use to avoid sprinkling the code with
50 // magic numbers. 46 // magic numbers.
51 static base::TimeDelta DefaultInterval(); 47 static base::TimeDelta DefaultInterval();
52 48
53 // This is the default amount of time after the frame_time to retroactively 49 // This is the default amount of time after the frame_time to retroactively
(...skipping 15 matching lines...) Expand all
69 private: 65 private:
70 BeginFrameArgs(base::TimeTicks frame_time, 66 BeginFrameArgs(base::TimeTicks frame_time,
71 base::TimeTicks deadline, 67 base::TimeTicks deadline,
72 base::TimeDelta interval, 68 base::TimeDelta interval,
73 BeginFrameArgsType type); 69 BeginFrameArgsType type);
74 }; 70 };
75 71
76 } // namespace cc 72 } // namespace cc
77 73
78 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ 74 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_
OLDNEW
« no previous file with comments | « cc/layers/ui_resource_layer_unittest.cc ('k') | cc/output/begin_frame_args.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698