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

Unified Diff: cc/output/begin_frame_args.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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/output/begin_frame_args.h ('k') | cc/output/begin_frame_args_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/begin_frame_args.cc
diff --git a/cc/output/begin_frame_args.cc b/cc/output/begin_frame_args.cc
index 0be93180f8783aa699fa618e19a2ddc1374a7c47..5744d9dbe843d8e7fff46927f25c4536ddc4090c 100644
--- a/cc/output/begin_frame_args.cc
+++ b/cc/output/begin_frame_args.cc
@@ -41,12 +41,19 @@ BeginFrameArgs::BeginFrameArgs(base::TimeTicks frame_time,
type(type) {
}
-BeginFrameArgs BeginFrameArgs::Create(base::TimeTicks frame_time,
+BeginFrameArgs BeginFrameArgs::Create(BeginFrameArgs::CreationLocation location,
+ base::TimeTicks frame_time,
base::TimeTicks deadline,
base::TimeDelta interval,
BeginFrameArgs::BeginFrameArgsType type) {
DCHECK_NE(type, BeginFrameArgs::INVALID);
+#ifdef NDEBUG
return BeginFrameArgs(frame_time, deadline, interval, type);
+#else
+ BeginFrameArgs args = BeginFrameArgs(frame_time, deadline, interval, type);
+ args.created_from = location;
+ return args;
+#endif
}
scoped_refptr<base::debug::ConvertableToTraceFormat> BeginFrameArgs::AsValue()
@@ -63,6 +70,9 @@ void BeginFrameArgs::AsValueInto(base::debug::TracedValue* state) const {
state->SetDouble("frame_time_us", frame_time.ToInternalValue());
state->SetDouble("deadline_us", deadline.ToInternalValue());
state->SetDouble("interval_us", interval.InMicroseconds());
+#ifndef NDEBUG
+ state->SetString("created_from", created_from.ToString());
+#endif
}
// This is a hard-coded deadline adjustment that assumes 60Hz, to be used in
« no previous file with comments | « cc/output/begin_frame_args.h ('k') | cc/output/begin_frame_args_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698