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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: cc/output/begin_frame_args.h
diff --git a/cc/output/begin_frame_args.h b/cc/output/begin_frame_args.h
new file mode 100644
index 0000000000000000000000000000000000000000..8ae2a88dafe16551341b73ccd380384450ee0099
--- /dev/null
+++ b/cc/output/begin_frame_args.h
@@ -0,0 +1,57 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_OUTPUT_BEGIN_FRAME_H_
+#define CC_OUTPUT_BEGIN_FRAME_H_
+
+#include "base/time.h"
+#include "cc/base/cc_export.h"
+#include "ipc/ipc_param_traits.h"
+
+namespace cc {
+
+class CC_EXPORT BeginFrameArgs {
+ public:
+ 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
+ ~BeginFrameArgs();
+
+ // You should be able to find all instances where a BeginFrame has been
+ // created or propogated/modified by searching for "CreateBeginFrame".
+ 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.
+ base::TimeTicks deadline,
+ base::TimeDelta interval);
+ static BeginFrameArgs CreateBeginFrameForSynchronousCompositor();
+ static BeginFrameArgs CreateBeginFrameForTesting();
+
+ // This is the default delta that will be used to adjust the deadline when
+ // proper draw-time estimations are not yet available.
+ 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
+
+ base::TimeTicks frame_time() const {
+ return frame_time_;
+ }
+
+ base::TimeTicks deadline() const {
+ return deadline_;
+ }
+
+ base::TimeDelta interval() const {
+ return interval_;
+ }
+
+ private:
+ friend class IPC::ParamTraits<BeginFrameArgs>;
+
+ BeginFrameArgs(base::TimeTicks frame_time,
+ base::TimeTicks deadline,
+ base::TimeDelta interval);
+
+ base::TimeTicks frame_time_;
+ base::TimeTicks deadline_;
+ base::TimeDelta interval_;
+};
+
+} // namespace cc
+
+#endif // CC_OUTPUT_BEGIN_FRAME_H_
« 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