Skip to content

Commit

Permalink
Revert "[tracing] SceneDisplayLag is a synchronous event (flutter#17878
Browse files Browse the repository at this point in the history
…)" (flutter#17916)

This reverts commit a544b45.

Reverts flutter#17878

This breaks our devicelab tests.

TBR: @flar
  • Loading branch information
liyuqian authored Apr 24, 2020
1 parent 6d426a6 commit 5f5f50d
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions shell/common/rasterizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ RasterStatus Rasterizer::DoDraw(
timing.Set(FrameTiming::kRasterFinish, raster_finish_time);
delegate_.OnFrameRasterized(timing);

std::string vsync_transitions_missed = "0";
if (raster_finish_time > frame_target_time) {
fml::TimePoint latest_frame_target_time =
delegate_.GetLatestFrameTargetTime();
Expand All @@ -298,16 +297,21 @@ RasterStatus Rasterizer::DoDraw(
}
const auto frame_lag =
(latest_frame_target_time - frame_target_time).ToMillisecondsF();
vsync_transitions_missed =
std::to_string(round(frame_lag / frame_budget_millis));
const int vsync_transitions_missed = round(frame_lag / frame_budget_millis);
fml::tracing::TraceEventAsyncComplete(
"flutter", // category
"SceneDisplayLag", // name
raster_finish_time, // begin_time
latest_frame_target_time, // end_time
"frame_target_time", // arg_key_1
frame_target_time, // arg_val_1
"current_frame_target_time", // arg_key_2
latest_frame_target_time, // arg_val_2
"vsync_transitions_missed", // arg_key_3
vsync_transitions_missed // arg_val_3
);
}

TRACE_EVENT1("flutter", // cateogry
"SceneDisplayLag", // name
"vsync_transitions_missed", // arg1_key
vsync_transitions_missed.c_str() // arg1_val
);

// Pipeline pressure is applied from a couple of places:
// rasterizer: When there are more items as of the time of Consume.
// animator (via shell): Frame gets produces every vsync.
Expand Down

0 comments on commit 5f5f50d

Please sign in to comment.