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

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

Issue 775143003: cc: Implement unified BeginFrame on aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // 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
75 // magic numbers. 75 // magic numbers.
76 static base::TimeDelta DefaultInterval(); 76 static base::TimeDelta DefaultInterval();
77 77
78 bool IsValid() const { return interval >= base::TimeDelta(); } 78 bool IsValid() const { return interval >= base::TimeDelta(); }
79 79
80 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; 80 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const;
81 void AsValueInto(base::trace_event::TracedValue* dict) const; 81 void AsValueInto(base::trace_event::TracedValue* dict) const;
82 82
83 bool operator==(const BeginFrameArgs& other) const {
84 return (frame_time == other.frame_time && deadline == other.deadline &&
85 interval == other.interval && type == other.type);
86 }
87 bool operator!=(const BeginFrameArgs& other) const {
88 return (frame_time != other.frame_time || deadline != other.deadline ||
89 interval != other.interval || type != other.type);
90 }
91
83 base::TimeTicks frame_time; 92 base::TimeTicks frame_time;
84 base::TimeTicks deadline; 93 base::TimeTicks deadline;
85 base::TimeDelta interval; 94 base::TimeDelta interval;
86 BeginFrameArgsType type; 95 BeginFrameArgsType type;
87 96
88 private: 97 private:
89 BeginFrameArgs(base::TimeTicks frame_time, 98 BeginFrameArgs(base::TimeTicks frame_time,
90 base::TimeTicks deadline, 99 base::TimeTicks deadline,
91 base::TimeDelta interval, 100 base::TimeDelta interval,
92 BeginFrameArgsType type); 101 BeginFrameArgsType type);
93 }; 102 };
94 103
95 } // namespace cc 104 } // namespace cc
96 105
97 #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