Commit 5c9d653c authored by Yichen Zhou's avatar Yichen Zhou Committed by Commit Bot

ash: Reset |presentation_time_recorder| when drag is completed.

|presentation_time_recorder| will be released with the
WorkspaceWindowResizer after the drag ends. However, in TAST testing,
metrics is collected before WorkspaceWindowResizer gets released. If we
don't release the recorder when drag is completed, the metrics will not
be collected correctly and timeout errors may occur.

Bug: 1032766
Change-Id: I7c7788ffc1255a33c47b41833813226de24f6531
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2211882
Commit-Queue: Yichen Zhou <yichenz@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771193}
parent 6c72275d
...@@ -586,6 +586,8 @@ void WorkspaceWindowResizer::Drag(const gfx::PointF& location_in_parent, ...@@ -586,6 +586,8 @@ void WorkspaceWindowResizer::Drag(const gfx::PointF& location_in_parent,
} }
void WorkspaceWindowResizer::CompleteDrag() { void WorkspaceWindowResizer::CompleteDrag() {
tab_dragging_recorder_.reset();
gfx::PointF last_mouse_location_in_screen = last_mouse_location_; gfx::PointF last_mouse_location_in_screen = last_mouse_location_;
::wm::ConvertPointToScreen(GetTarget()->parent(), ::wm::ConvertPointToScreen(GetTarget()->parent(),
&last_mouse_location_in_screen); &last_mouse_location_in_screen);
...@@ -687,6 +689,8 @@ void WorkspaceWindowResizer::CompleteDrag() { ...@@ -687,6 +689,8 @@ void WorkspaceWindowResizer::CompleteDrag() {
} }
void WorkspaceWindowResizer::RevertDrag() { void WorkspaceWindowResizer::RevertDrag() {
tab_dragging_recorder_.reset();
gfx::PointF last_mouse_location_in_screen = last_mouse_location_; gfx::PointF last_mouse_location_in_screen = last_mouse_location_;
::wm::ConvertPointToScreen(GetTarget()->parent(), ::wm::ConvertPointToScreen(GetTarget()->parent(),
&last_mouse_location_in_screen); &last_mouse_location_in_screen);
......
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