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

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

Issue 16863005: cc: Add BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@nofrc12
Patch Set: Created 7 years, 6 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
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_OUTPUT_BEGIN_FRAME_H_
6 #define CC_OUTPUT_BEGIN_FRAME_H_
7
8 #include "base/time.h"
9 #include "cc/base/cc_export.h"
10 #include "ipc/ipc_param_traits.h"
11
12 namespace cc {
13
14 class CC_EXPORT BeginFrameArgs {
15 public:
16 BeginFrameArgs();
Sami 2013/06/13 10:01:07 Can we make this default constructor private/prote
brianderson 2013/06/14 20:12:02 Sure. To do so, we will also need to add a CreateE
brianderson 2013/06/14 21:07:18 Actually, to send this as a message, we need a def
17 ~BeginFrameArgs();
18
19 // You should be able to find all instances where a BeginFrame has been
20 // created or propogated/modified by searching for "CreateBeginFrame".
21 static BeginFrameArgs CreateBeginFrame(base::TimeTicks frame_time,
Sami 2013/06/13 10:01:07 Bikeshed: drop the "BeginFrame", it's cleaner :) C
brianderson 2013/06/14 20:12:02 Sounds good.
22 base::TimeTicks deadline,
23 base::TimeDelta interval);
24 static BeginFrameArgs CreateBeginFrameForSynchronousCompositor();
25 static BeginFrameArgs CreateBeginFrameForTesting();
26
27 // This is the default delta that will be used to adjust the deadline when
28 // proper draw-time estimations are not yet available.
29 static base::TimeDelta DefaultDeadlineAdjustment();
Sami 2013/06/13 10:01:07 Could this be a static constant or do you think we
brianderson 2013/06/14 20:12:02 I wanted to make this a function in case we wanted
30
31 base::TimeTicks frame_time() const {
32 return frame_time_;
33 }
34
35 base::TimeTicks deadline() const {
36 return deadline_;
37 }
38
39 base::TimeDelta interval() const {
40 return interval_;
41 }
42
43 private:
44 friend class IPC::ParamTraits<BeginFrameArgs>;
45
46 BeginFrameArgs(base::TimeTicks frame_time,
47 base::TimeTicks deadline,
48 base::TimeDelta interval);
49
50 base::TimeTicks frame_time_;
51 base::TimeTicks deadline_;
52 base::TimeDelta interval_;
53 };
54
55 } // namespace cc
56
57 #endif // CC_OUTPUT_BEGIN_FRAME_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/output/begin_frame_args.cc » ('j') | cc/scheduler/frame_rate_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698