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

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

Issue 270703004: Making BeginFrameArgs work with TRACE_EVENT system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | 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/debug/trace_event.h"
8 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "base/values.h"
9 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
10 12
11 namespace cc { 13 namespace cc {
12 14
13 struct CC_EXPORT BeginFrameArgs { 15 struct CC_EXPORT BeginFrameArgs {
14 // Creates an invalid set of values. 16 // Creates an invalid set of values.
15 BeginFrameArgs(); 17 BeginFrameArgs();
16 18
17 // You should be able to find all instances where a BeginFrame has been 19 // You should be able to find all instances where a BeginFrame has been
18 // created by searching for "BeginFrameArgs::Create". 20 // created by searching for "BeginFrameArgs::Create".
(...skipping 13 matching lines...) Expand all
32 static base::TimeDelta DefaultInterval(); 34 static base::TimeDelta DefaultInterval();
33 35
34 // This is the default amount of time after the frame_time to retroactively 36 // This is the default amount of time after the frame_time to retroactively
35 // send a BeginFrame that had been skipped. This only has an effect if the 37 // send a BeginFrame that had been skipped. This only has an effect if the
36 // deadline has passed, since the deadline is also used to trigger BeginFrame 38 // deadline has passed, since the deadline is also used to trigger BeginFrame
37 // retroactively. 39 // retroactively.
38 static base::TimeDelta DefaultRetroactiveBeginFramePeriod(); 40 static base::TimeDelta DefaultRetroactiveBeginFramePeriod();
39 41
40 bool IsValid() const { return interval >= base::TimeDelta(); } 42 bool IsValid() const { return interval >= base::TimeDelta(); }
41 43
44 scoped_ptr<base::Value> AsValue() const;
45 scoped_refptr<base::debug::ConvertableToTraceFormat> AsTrace() const;
brianderson 2014/05/08 17:03:16 How is AsTrace() different than AsValue()?
mithro-old 2014/05/08 19:44:23 AsTrace is used for giving to the trace system.
46
42 base::TimeTicks frame_time; 47 base::TimeTicks frame_time;
43 base::TimeTicks deadline; 48 base::TimeTicks deadline;
44 base::TimeDelta interval; 49 base::TimeDelta interval;
45 50
46 private: 51 private:
47 BeginFrameArgs(base::TimeTicks frame_time, 52 BeginFrameArgs(base::TimeTicks frame_time,
48 base::TimeTicks deadline, 53 base::TimeTicks deadline,
49 base::TimeDelta interval); 54 base::TimeDelta interval);
50 }; 55 };
51 56
52 } // namespace cc 57 } // namespace cc
53 58
54 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ 59 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_
OLDNEW
« no previous file with comments | « no previous file | cc/output/begin_frame_args.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698