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

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

Issue 423773002: Unified BeginFrame scheduling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
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 {
mithro-old 2014/09/09 03:22:37 We have an operator== used just for testing in cc/
54 return (frame_time == other.frame_time &
brianderson 2014/09/04 18:45:45 & -> &&
55 deadline == other.deadline &&
56 interval == other.interval);
57 }
58
59 bool operator!=(const BeginFrameArgs& other) const {
60 return (frame_time != other.frame_time ||
61 deadline != other.deadline ||
62 interval != other.interval);
63 }
64
53 base::TimeTicks frame_time; 65 base::TimeTicks frame_time;
54 base::TimeTicks deadline; 66 base::TimeTicks deadline;
55 base::TimeDelta interval; 67 base::TimeDelta interval;
56 68
57 private: 69 private:
58 BeginFrameArgs(base::TimeTicks frame_time, 70 BeginFrameArgs(base::TimeTicks frame_time,
59 base::TimeTicks deadline, 71 base::TimeTicks deadline,
60 base::TimeDelta interval); 72 base::TimeDelta interval);
61 }; 73 };
62 74
63 } // namespace cc 75 } // namespace cc
64 76
65 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ 77 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/output/output_surface.h » ('j') | cc/output/output_surface.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698