From c1b8cd2bedf755b49a9abed8e6d81e45a706b298 Mon Sep 17 00:00:00 2001 From: Chandan Padhi Date: Tue, 27 Oct 2020 17:34:35 +0530 Subject: [PATCH] [M85 Migration] Remove EWK_BRINGUP related to LatencyInfo This commits removes EWK_BRINGUP to provide LatencyInfo with original timestamp. Reference: https://review.tizen.org/gerrit/223737/ Change-Id: I3f883a6f9b56c0a8ad40c3630af189c5a3f64147 Signed-off-by: Chandan Padhi (cherry picked from commit c4f85976cea0ae4d9c2f0aee520690ae2ed21ecd) --- .../renderer_host/render_widget_host_view_efl.cc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc b/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc index b882476..69c9d2d 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc +++ b/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc @@ -1334,17 +1334,15 @@ void RenderWidgetHostViewEfl::set_magnifier(bool status) { } ui::LatencyInfo CreateLatencyInfo(const blink::WebInputEvent& event) { - ui::LatencyInfo latency_info; + if (!event.TimeStamp().since_origin().InMicroseconds()) + return ui::LatencyInfo(); + // The latency number should only be added if the timestamp is valid. -#if !defined(EWK_BRINGUP) // FIXME: m69 bringup - if (event.TimeStampSeconds()) { - const int64_t time_micros = static_cast( - event.TimeStampSeconds() * base::Time::kMicrosecondsPerSecond); - latency_info.AddLatencyNumberWithTimestamp( - ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0, 0, - base::TimeTicks() + base::TimeDelta::FromMicroseconds(time_micros), 1); - } -#endif + ui::LatencyInfo latency_info; + const int64_t time_micros = event.TimeStamp().since_origin().InMicroseconds(); + latency_info.AddLatencyNumberWithTimestamp( + ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, + base::TimeTicks() + base::TimeDelta::FromMicroseconds(time_micros)); return latency_info; } -- 2.7.4