Avoid heap allocations with GestureEventDataPacket
commit6a565f0f33da0eb60371a5be8980b521f6b1980a
authorjdduke@chromium.org <jdduke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 22 Jul 2014 18:20:04 +0000 (22 18:20 +0000)
committerjdduke@chromium.org <jdduke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 22 Jul 2014 18:20:04 +0000 (22 18:20 +0000)
treeb3a9d4d0c1610db491c208fc470551e2e57cd565
parentcadece29c4b24939b5d63bf1f860c9410f9c0935
Avoid heap allocations with GestureEventDataPacket

There are typically only a few events in a given gesture packet.  Avoid heap
allocating in the common case by switching from a raw vector to a StackVector.

BUG=395168

Review URL: https://codereview.chromium.org/403173004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284728 0039d316-1c4b-4281-b951-d872f2087c98
ui/events/BUILD.gn
ui/events/events.gyp
ui/events/gesture_detection/gesture_event_data_packet.cc
ui/events/gesture_detection/gesture_event_data_packet.h
ui/events/gesture_detection/gesture_event_data_packet_unittest.cc [new file with mode: 0644]