[M85 Migration] Remove EWK_BRINGUP related to LatencyInfo 05/246505/1
authorChandan Padhi <c.padhi@samsung.com>
Tue, 27 Oct 2020 12:04:35 +0000 (17:34 +0530)
committerChandan Padhi <c.padhi@samsung.com>
Fri, 30 Oct 2020 07:12:22 +0000 (07:12 +0000)
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 <c.padhi@samsung.com>
(cherry picked from commit c4f85976cea0ae4d9c2f0aee520690ae2ed21ecd)

tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc

index b882476..69c9d2d 100644 (file)
@@ -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<int64_t>(
-        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;
 }