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

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

Issue 1717283003: tracing: Make ConvertableToTraceFormat move-only scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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 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"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // This is the default delta that will be used to adjust the deadline when 75 // This is the default delta that will be used to adjust the deadline when
76 // proper draw-time estimations are not yet available. 76 // proper draw-time estimations are not yet available.
77 static base::TimeDelta DefaultEstimatedParentDrawTime(); 77 static base::TimeDelta DefaultEstimatedParentDrawTime();
78 78
79 // This is the default interval to use to avoid sprinkling the code with 79 // This is the default interval to use to avoid sprinkling the code with
80 // magic numbers. 80 // magic numbers.
81 static base::TimeDelta DefaultInterval(); 81 static base::TimeDelta DefaultInterval();
82 82
83 bool IsValid() const { return interval >= base::TimeDelta(); } 83 bool IsValid() const { return interval >= base::TimeDelta(); }
84 84
85 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; 85 scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
86 void AsValueInto(base::trace_event::TracedValue* dict) const; 86 void AsValueInto(base::trace_event::TracedValue* dict) const;
87 87
88 void ToProtobuf(proto::BeginFrameArgs* proto) const; 88 void ToProtobuf(proto::BeginFrameArgs* proto) const;
89 void FromProtobuf(const proto::BeginFrameArgs& proto); 89 void FromProtobuf(const proto::BeginFrameArgs& proto);
90 90
91 base::TimeTicks frame_time; 91 base::TimeTicks frame_time;
92 base::TimeTicks deadline; 92 base::TimeTicks deadline;
93 base::TimeDelta interval; 93 base::TimeDelta interval;
94 BeginFrameArgsType type; 94 BeginFrameArgsType type;
95 bool on_critical_path; 95 bool on_critical_path;
96 96
97 private: 97 private:
98 BeginFrameArgs(base::TimeTicks frame_time, 98 BeginFrameArgs(base::TimeTicks frame_time,
99 base::TimeTicks deadline, 99 base::TimeTicks deadline,
100 base::TimeDelta interval, 100 base::TimeDelta interval,
101 BeginFrameArgsType type); 101 BeginFrameArgsType type);
102 }; 102 };
103 103
104 } // namespace cc 104 } // namespace cc
105 105
106 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ 106 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698