Change blink::WebInputEvent timestamp from double to base::TimeTicks.
Using a double timestamp is prone to errors, since nothing stops a
numerical quantity with the wrong units from being passed in (or even
worse... random unscoped enumerators).
Instead, just use base::TimeTicks directly in blink::WebInputEvent:
this allows all the conversions between base::TimeTicks and doubles to
be removed and ensures better type-safety throughout the code. Several
methods in the Blink public API have also been converted to pass time as
base::TimeTicks, though those changes are limited to avoid changing the
entire codebase in one CL.
Bug: 763980
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2;luci.chromium.try:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I258486006302d010b121b39628ca3e8b3d71491f
Reviewed-on: https://chromium-review.googlesource.com/793050
Commit-Queue: Daniel Cheng <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Dave Tapuska <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Cr-Commit-Position: refs/heads/master@{#553460}
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index 010f8b51..f3f1224 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -257,7 +257,7 @@
float top_controls_delta) override;
void RecordWheelAndTouchScrollingCount(bool has_scrolled_by_wheel,
bool has_scrolled_by_touch) override;
- void BeginMainFrame(double frame_time_sec) override;
+ void BeginMainFrame(base::TimeTicks frame_time) override;
void RequestNewLayerTreeFrameSink(
const LayerTreeFrameSinkCallback& callback) override;
void DidCommitAndDrawCompositorFrame() override;