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

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

Issue 548153004: Unified BeginFrame scheduling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 6 years, 3 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/output_surface.h » ('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"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // send a BeginFrame that had been skipped. This only has an effect if the 43 // send a BeginFrame that had been skipped. This only has an effect if the
44 // deadline has passed, since the deadline is also used to trigger BeginFrame 44 // deadline has passed, since the deadline is also used to trigger BeginFrame
45 // retroactively. 45 // retroactively.
46 static base::TimeDelta DefaultRetroactiveBeginFramePeriod(); 46 static base::TimeDelta DefaultRetroactiveBeginFramePeriod();
47 47
48 bool IsValid() const { return interval >= base::TimeDelta(); } 48 bool IsValid() const { return interval >= base::TimeDelta(); }
49 49
50 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const; 50 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const;
51 void AsValueInto(base::debug::TracedValue* dict) const; 51 void AsValueInto(base::debug::TracedValue* dict) const;
52 52
53 bool operator==(const BeginFrameArgs& other) const {
54 return (frame_time == other.frame_time & deadline == other.deadline &&
55 interval == other.interval);
56 }
57
58 bool operator!=(const BeginFrameArgs& other) const {
59 return (frame_time != other.frame_time || deadline != other.deadline ||
60 interval != other.interval);
61 }
62
53 base::TimeTicks frame_time; 63 base::TimeTicks frame_time;
54 base::TimeTicks deadline; 64 base::TimeTicks deadline;
55 base::TimeDelta interval; 65 base::TimeDelta interval;
56 66
57 private: 67 private:
58 BeginFrameArgs(base::TimeTicks frame_time, 68 BeginFrameArgs(base::TimeTicks frame_time,
59 base::TimeTicks deadline, 69 base::TimeTicks deadline,
60 base::TimeDelta interval); 70 base::TimeDelta interval);
61 }; 71 };
62 72
63 } // namespace cc 73 } // namespace cc
64 74
65 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ 75 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/output/output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698