Commit 8f5fc49b authored by Xida Chen's avatar Xida Chen Committed by Commit Bot

[Reland] Track the last imp-frame

This is a re-land of:
https://chromium-review.googlesource.com/c/chromium/src/+/2079134

The previous CL had a problem where a tracker may not being terminated.
This CL fixes that and tests are added.

PS#3 is the same as the original CL, so that the diffs can be easily
seen.

Bug: 1055844
Change-Id: I62cffba355980013db8fa392fbb66d0ea74749af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2122242Reviewed-by: default avatarRobert Flack <flackr@chromium.org>
Commit-Queue: Xida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756018}
parent c7f58a70
This diff is collapsed.
......@@ -227,6 +227,8 @@ class CC_EXPORT FrameSequenceTrackerCollection {
CustomTrackerResults TakeCustomTrackerResults();
FrameSequenceTracker* GetTrackerForTesting(FrameSequenceTrackerType type);
FrameSequenceTracker* GetRemovalTrackerForTesting(
FrameSequenceTrackerType type);
void SetUkmManager(UkmManager* manager);
......@@ -234,6 +236,8 @@ class CC_EXPORT FrameSequenceTrackerCollection {
friend class FrameSequenceTrackerTest;
void RecreateTrackers(const viz::BeginFrameArgs& args);
// Destroy the trackers that are ready to be terminated.
void DestroyTrackers();
const bool is_single_threaded_;
// The callsite can use the type to manipulate the tracker.
......@@ -489,9 +493,11 @@ class CC_EXPORT FrameSequenceTracker {
void Advance(base::TimeTicks new_timestamp);
} trace_data_;
#if DCHECK_IS_ON()
// True when an impl-impl is not ended. A tracker is ready for termination
// only when the last impl-frame is ended (ReportFrameEnd).
bool is_inside_frame_ = false;
#if DCHECK_IS_ON()
// This stringstream represents a sequence of frame reporting activities on
// the current tracker. Each letter can be one of the following:
// {'B', 'N', 'b', 'n', 'S', 'P'}, where
......
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