cc: Adding creation location to debug BeginFrameArgs objects.
This allows easy tracing of a BeginFrameArgs object back to the
BeginFrameSource that created it. This is very useful as we have multiple
BeginFrameSources in the system now. The Primary / Background sources being a
perfect example.
While location tracking is highly optimised (as it is used in every base::Bind
calls) it doubles the size of BeginFrameArgs objects. Hence we only enable
location tracking in debug builds. In release builds we make sure to never
create the Location objects in the first place, so no extra strings are found
in the binary. This can be checked with the strings tool.
BUG=346230
DEPS=742683002
Review URL: https://codereview.chromium.org/735723005
Cr-Commit-Position: refs/heads/master@{#306326}
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index ea30d85..10b0685 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -3246,9 +3246,9 @@
// task), fall back to physical time. This should still be monotonic.
if (current_begin_frame_args_.IsValid())
return current_begin_frame_args_;
- return BeginFrameArgs::Create(gfx::FrameTime::Now(), base::TimeTicks(),
- BeginFrameArgs::DefaultInterval(),
- BeginFrameArgs::NORMAL);
+ return BeginFrameArgs::Create(
+ BEGINFRAME_FROM_HERE, gfx::FrameTime::Now(), base::TimeTicks(),
+ BeginFrameArgs::DefaultInterval(), BeginFrameArgs::NORMAL);
}
scoped_refptr<base::debug::ConvertableToTraceFormat>