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

Unified Diff: cc/surfaces/display_scheduler.cc

Issue 2772343002: cc: Fix DisplayScheduler:pending_swaps tracing. (Closed)
Patch Set: Remove aysnc. Created 3 years, 9 months 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/surfaces/display_scheduler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display_scheduler.cc
diff --git a/cc/surfaces/display_scheduler.cc b/cc/surfaces/display_scheduler.cc
index 1e91f5fd43004ad3867b92a21595f9fefc0ec044..a088031e89ca11130f1b0d29049549801e44e2d9 100644
--- a/cc/surfaces/display_scheduler.cc
+++ b/cc/surfaces/display_scheduler.cc
@@ -26,6 +26,7 @@ DisplayScheduler::DisplayScheduler(base::SingleThreadTaskRunner* task_runner,
needs_draw_(false),
expecting_root_surface_damage_because_of_resize_(false),
all_active_child_surfaces_ready_to_draw_(false),
+ next_swap_id_(1),
pending_swaps_(0),
max_pending_swaps_(max_pending_swaps),
observing_begin_frame_source_(false),
@@ -372,14 +373,14 @@ void DisplayScheduler::DidFinishFrame(bool did_draw) {
void DisplayScheduler::DidSwapBuffers() {
pending_swaps_++;
- TRACE_EVENT_ASYNC_BEGIN1("cc", "DisplayScheduler:pending_swaps", this,
- "pending_frames", pending_swaps_);
+ uint32_t swap_id = next_swap_id_++;
+ TRACE_EVENT_ASYNC_BEGIN0("cc", "DisplayScheduler:pending_swaps", swap_id);
}
void DisplayScheduler::DidReceiveSwapBuffersAck() {
+ uint32_t swap_id = next_swap_id_ - pending_swaps_;
pending_swaps_--;
- TRACE_EVENT_ASYNC_END1("cc", "DisplayScheduler:pending_swaps", this,
- "pending_frames", pending_swaps_);
+ TRACE_EVENT_ASYNC_END0("cc", "DisplayScheduler:pending_swaps", swap_id);
ScheduleBeginFrameDeadline();
}
« no previous file with comments | « cc/surfaces/display_scheduler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698