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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/layers/video_layer_impl.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/location.h" 8 #include "base/location.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "cc/base/cc_export.h" 12 #include "cc/base/cc_export.h"
13 13
14 namespace base { 14 namespace base {
15 namespace trace_event { 15 namespace trace_event {
16 class ConvertableToTraceFormat; 16 class ConvertableToTraceFormat;
17 class TracedValue; 17 class TracedValue;
18 } 18 }
19
20 // TODO(ssid): remove these aliases after the tracing clients are moved to the
21 // new trace_event namespace. See crbug.com/451032. ETA: March 2015
22 namespace debug {
23 using ::base::trace_event::ConvertableToTraceFormat;
24 using ::base::trace_event::TracedValue;
25 } 19 }
26 } // namespace base
27 20
28 /** 21 /**
29 * In debug builds we trace the creation origin of BeginFrameArgs objects. We 22 * In debug builds we trace the creation origin of BeginFrameArgs objects. We
30 * reuse the tracked_objects::Location system to do that. 23 * reuse the tracked_objects::Location system to do that.
31 * 24 *
32 * However, in release builds we don't want this as it doubles the size of the 25 * However, in release builds we don't want this as it doubles the size of the
33 * BeginFrameArgs object. As well it adds a number of largish strings to the 26 * BeginFrameArgs object. As well it adds a number of largish strings to the
34 * binary. Despite the argument being unused, most compilers are unable to 27 * binary. Despite the argument being unused, most compilers are unable to
35 * optimise it away even when unused. Instead we use the BEGINFRAME_FROM_HERE 28 * optimise it away even when unused. Instead we use the BEGINFRAME_FROM_HERE
36 * macro to prevent the data even getting referenced. 29 * macro to prevent the data even getting referenced.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // This is the default delta that will be used to adjust the deadline when 70 // This is the default delta that will be used to adjust the deadline when
78 // proper draw-time estimations are not yet available. 71 // proper draw-time estimations are not yet available.
79 static base::TimeDelta DefaultEstimatedParentDrawTime(); 72 static base::TimeDelta DefaultEstimatedParentDrawTime();
80 73
81 // This is the default interval to use to avoid sprinkling the code with 74 // This is the default interval to use to avoid sprinkling the code with
82 // magic numbers. 75 // magic numbers.
83 static base::TimeDelta DefaultInterval(); 76 static base::TimeDelta DefaultInterval();
84 77
85 bool IsValid() const { return interval >= base::TimeDelta(); } 78 bool IsValid() const { return interval >= base::TimeDelta(); }
86 79
87 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const; 80 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
88 void AsValueInto(base::debug::TracedValue* dict) const; 81 void AsValueInto(base::trace_event::TracedValue* dict) const;
89 82
90 base::TimeTicks frame_time; 83 base::TimeTicks frame_time;
91 base::TimeTicks deadline; 84 base::TimeTicks deadline;
92 base::TimeDelta interval; 85 base::TimeDelta interval;
93 BeginFrameArgsType type; 86 BeginFrameArgsType type;
94 87
95 private: 88 private:
96 BeginFrameArgs(base::TimeTicks frame_time, 89 BeginFrameArgs(base::TimeTicks frame_time,
97 base::TimeTicks deadline, 90 base::TimeTicks deadline,
98 base::TimeDelta interval, 91 base::TimeDelta interval,
99 BeginFrameArgsType type); 92 BeginFrameArgsType type);
100 }; 93 };
101 94
102 } // namespace cc 95 } // namespace cc
103 96
104 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ 97 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_
OLDNEW
« no previous file with comments | « cc/layers/video_layer_impl.cc ('k') | cc/output/begin_frame_args.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698