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

Unified Diff: cc/output/begin_frame_args.h

Issue 2583483002: [cc] Adds source_id and sequence_number to BeginFrameArgs. (Closed)
Patch Set: fix field ordering Created 4 years 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
« no previous file with comments | « cc/ipc/cc_param_traits_macros.h ('k') | cc/output/begin_frame_args.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/begin_frame_args.h
diff --git a/cc/output/begin_frame_args.h b/cc/output/begin_frame_args.h
index 78ddce99ddfcde3c4508f1d706d4b1eb205ff89f..a75f446e8dcc762adbc412c20675dd6ce13a075a 100644
--- a/cc/output/begin_frame_args.h
+++ b/cc/output/begin_frame_args.h
@@ -5,6 +5,7 @@
#ifndef CC_OUTPUT_BEGIN_FRAME_ARGS_H_
#define CC_OUTPUT_BEGIN_FRAME_ARGS_H_
+#include <stdint.h>
#include <memory>
#include "base/location.h"
@@ -49,6 +50,9 @@ struct CC_EXPORT BeginFrameArgs {
};
static const char* TypeToString(BeginFrameArgsType type);
+ static constexpr uint64_t kInvalidFrameNumber = 0;
+ static constexpr uint64_t kStartingFrameNumber = 1;
+
// Creates an invalid set of values.
BeginFrameArgs();
@@ -63,6 +67,8 @@ struct CC_EXPORT BeginFrameArgs {
// created by searching for "BeginFrameArgs::Create".
// The location argument should **always** be BEGINFRAME_FROM_HERE macro.
static BeginFrameArgs Create(CreationLocation location,
+ uint32_t source_id,
+ uint64_t sequence_number,
base::TimeTicks frame_time,
base::TimeTicks deadline,
base::TimeDelta interval,
@@ -84,11 +90,21 @@ struct CC_EXPORT BeginFrameArgs {
base::TimeTicks frame_time;
base::TimeTicks deadline;
base::TimeDelta interval;
+
+ // |source_id| and |sequence_number| identify a BeginFrame within a single
+ // process and are set by the original BeginFrameSource that created the
+ // BeginFrameArgs. When |source_id| of consecutive BeginFrameArgs changes,
+ // observers should expect the continuity of |sequence_number| to break.
+ uint64_t sequence_number;
+ uint32_t source_id; // |source_id| after |sequence_number| for packing.
+
BeginFrameArgsType type;
bool on_critical_path;
private:
- BeginFrameArgs(base::TimeTicks frame_time,
+ BeginFrameArgs(uint32_t source_id,
+ uint64_t sequence_number,
+ base::TimeTicks frame_time,
base::TimeTicks deadline,
base::TimeDelta interval,
BeginFrameArgsType type);
« no previous file with comments | « cc/ipc/cc_param_traits_macros.h ('k') | cc/output/begin_frame_args.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698