Commit a1eb30c9 authored by Sadrul Habib Chowdhury's avatar Sadrul Habib Chowdhury Committed by Commit Bot

[cleanup] Some misc cleanups in cc.

. Remove a TODO about renaming that does not need to happen anymore.
. Use the sequence-number of a BeginFrameArgs in some traces, rather
  than having a separate identifier. This makes it easier to follow the
  traces, since various other trace-events also use the same sequence
  number from BeginFrameArgs.

BUG=none

Change-Id: Ifb2c8e0f480b884485dbfb8f1af7106200fbd0cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2392401
Auto-Submit: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805509}
parent 14343a0f
......@@ -25,8 +25,6 @@ constexpr const char* Category() {
const char kBeginFrameId[] = "begin_frame_id";
} // namespace internal
// TODO(khushalsagar): Fix these names for the telemetry benchmarks.
// See crbug/567993.
const char kSendBeginFrame[] = "ThreadProxy::ScheduledActionSendBeginMainFrame";
const char kDoBeginFrame[] = "ThreadProxy::BeginMainFrame";
......
......@@ -24,7 +24,6 @@ struct CC_EXPORT BeginMainFrameAndCommitState {
BeginMainFrameAndCommitState();
~BeginMainFrameAndCommitState();
unsigned int begin_frame_id = 0;
viz::BeginFrameArgs begin_frame_args;
std::unique_ptr<CompositorCommitData> commit_data;
size_t memory_allocation_limit_bytes = 0;
......
......@@ -41,8 +41,6 @@ namespace {
// Measured in seconds.
const double kSmoothnessTakesPriorityExpirationDelay = 0.25;
unsigned int nextBeginFrameId = 0;
} // namespace
// Ensures that a CompletionEvent is always signaled.
......@@ -576,12 +574,11 @@ void ProxyImpl::WillNotReceiveBeginFrame() {
void ProxyImpl::ScheduledActionSendBeginMainFrame(
const viz::BeginFrameArgs& args) {
DCHECK(IsImplThread());
unsigned int begin_frame_id = nextBeginFrameId++;
benchmark_instrumentation::ScopedBeginFrameTask begin_frame_task(
benchmark_instrumentation::kSendBeginFrame, begin_frame_id);
benchmark_instrumentation::kSendBeginFrame,
args.frame_id.sequence_number);
std::unique_ptr<BeginMainFrameAndCommitState> begin_main_frame_state(
new BeginMainFrameAndCommitState);
begin_main_frame_state->begin_frame_id = begin_frame_id;
begin_main_frame_state->begin_frame_args = args;
begin_main_frame_state->commit_data = host_impl_->ProcessCompositorDeltas();
begin_main_frame_state->completed_image_decode_requests =
......
......@@ -127,7 +127,7 @@ void ProxyMain::BeginMainFrame(
benchmark_instrumentation::ScopedBeginFrameTask begin_frame_task(
benchmark_instrumentation::kDoBeginFrame,
begin_main_frame_state->begin_frame_id);
begin_main_frame_state->begin_frame_args.frame_id.sequence_number);
// This needs to run unconditionally, so do it before any early-returns.
if (layer_tree_host_->scheduling_client())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment