diff options
author | miletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-29 04:05:20 +0000 |
---|---|---|
committer | miletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-29 04:05:20 +0000 |
commit | 6bd99fcc22da8d31ca10ee224d9461a981166505 (patch) | |
tree | a8c895e6132c9e73c01afccb81399e2d8741fa2b /ui | |
parent | 4b15766b5d7cf3cf642d6c745f2ea87cda351063 (diff) | |
download | chromium_src-6bd99fcc22da8d31ca10ee224d9461a981166505.zip chromium_src-6bd99fcc22da8d31ca10ee224d9461a981166505.tar.gz chromium_src-6bd99fcc22da8d31ca10ee224d9461a981166505.tar.bz2 |
Let gesture carry microseconds timestamp
We are converting gesture's timestamp to microseconds at many
places (e.g. for latency measure). So let's not truncate the
timestamp to milliseconds level when creating the event.
BUG=243443
TEST=None.
Review URL: https://chromiumcodereview.appspot.com/16159007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/base/gestures/gesture_sequence.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/base/gestures/gesture_sequence.cc b/ui/base/gestures/gesture_sequence.cc index f122d17..18ab22e 100644 --- a/ui/base/gestures/gesture_sequence.cc +++ b/ui/base/gestures/gesture_sequence.cc @@ -646,9 +646,11 @@ GestureEvent* GestureSequence::CreateGestureEvent( GestureEventDetails gesture_details(details); gesture_details.set_touch_points(point_count_); gesture_details.set_bounding_box(bounding_box_); + base::TimeDelta time_stamp = + base::TimeDelta::FromMicroseconds(timestamp.ToDoubleT() * 1000000); return new GestureEvent(gesture_details.type(), location.x(), location.y(), - flags, base::TimeDelta::FromMilliseconds(timestamp.ToDoubleT() * 1000), - gesture_details, touch_id_bitmask); + flags, time_stamp, gesture_details, + touch_id_bitmask); } void GestureSequence::AppendTapDownGestureEvent(const GesturePoint& point, |