Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Issue 502993004: Remove abstract Clone and Cancel methods from MotionEvent (Closed)

Created:
6 years, 4 months ago by jdduke (slow)
Modified:
6 years, 2 months ago
Reviewers:
tdresser, sky
CC:
chromium-reviews, darin-cc_chromium.org, jdduke+watch_chromium.org, jam, tdresser+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Remove abstract Clone and Cancel methods from MotionEvent Create a single implementation of MotionEvent's |Clone()| and |Cancel()| methods using MotionEventGeneric. Expand MotionEventGeneric to support historical events, also removing CompoundMotionEvent from the MotionEventBuffer implementation. By avoiding JNI and garbage creation, this reduces the cost of both methods by ~10x on Android, from ~25us call to ~2us. BUG=501503003 Committed: https://crrev.com/b5a33976eb45777e6ca7c8785677d4df08eb04fd Cr-Commit-Position: refs/heads/master@{#301136}

Patch Set 1 #

Patch Set 2 : Cleanup #

Patch Set 3 : Dirty rebase #

Patch Set 4 : Rebase #

Patch Set 5 : More optimizations #

Patch Set 6 : Fix test #

Patch Set 7 : Rebase #

Total comments: 12

Patch Set 8 : Updates #

Patch Set 9 : More cleanup #

Patch Set 10 : Owner for BUILD.gn #

Total comments: 2

Patch Set 11 : Cleanup and ToString #

Patch Set 12 : Nasty bug fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+662 lines, -1026 lines) Patch
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +19 lines, -17 lines 0 comments Download
M content/browser/renderer_host/input/gesture_text_selector_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/input/motion_event_android.h View 1 2 3 4 5 chunks +44 lines, -54 lines 0 comments Download
M content/browser/renderer_host/input/motion_event_android.cc View 1 2 3 4 12 chunks +62 lines, -190 lines 0 comments Download
M content/browser/renderer_host/input/motion_event_android_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +58 lines, -134 lines 0 comments Download
M content/browser/renderer_host/input/motion_event_web.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/renderer_host/input/motion_event_web.cc View 1 2 2 chunks +0 lines, -15 lines 0 comments Download
M content/browser/renderer_host/input/touch_handle_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/input/touch_selection_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/input/web_input_event_util_unittest.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ui/events/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download
M ui/events/OWNERS View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M ui/events/events.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download
M ui/events/gesture_detection/bitset_32.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/events/gesture_detection/gesture_event_data_packet_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M ui/events/gesture_detection/gesture_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M ui/events/gesture_detection/motion_event.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -8 lines 0 comments Download
M ui/events/gesture_detection/motion_event.cc View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -41 lines 0 comments Download
M ui/events/gesture_detection/motion_event_buffer.h View 1 2 3 chunks +5 lines, -2 lines 0 comments Download
M ui/events/gesture_detection/motion_event_buffer.cc View 1 2 3 4 5 6 7 10 chunks +100 lines, -213 lines 0 comments Download
M ui/events/gesture_detection/motion_event_buffer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +8 lines, -8 lines 0 comments Download
M ui/events/gesture_detection/motion_event_generic.h View 1 2 3 4 5 6 7 8 5 chunks +22 lines, -3 lines 0 comments Download
M ui/events/gesture_detection/motion_event_generic.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +122 lines, -14 lines 0 comments Download
M ui/events/gesture_detection/motion_event_generic_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +101 lines, -6 lines 0 comments Download
M ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M ui/events/gesture_detection/velocity_tracker_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M ui/events/gestures/motion_event_aura.h View 1 2 3 4 5 2 chunks +1 line, -4 lines 0 comments Download
M ui/events/gestures/motion_event_aura.cc View 1 2 3 4 5 6 5 chunks +10 lines, -27 lines 0 comments Download
M ui/events/gestures/motion_event_aura_unittest.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +19 lines, -18 lines 0 comments Download
M ui/events/test/mock_motion_event.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -61 lines 0 comments Download
M ui/events/test/mock_motion_event.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -177 lines 0 comments Download
A + ui/events/test/motion_event_test_utils.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +8 lines, -4 lines 0 comments Download
A + ui/events/test/motion_event_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +56 lines, -14 lines 0 comments Download

Messages

Total messages: 23 (4 generated)
jdduke (slow)
Patchset #2 (id:20001) has been deleted
6 years, 4 months ago (2014-08-25 22:26:02 UTC) #1
jdduke (slow)
Patchset #3 (id:60001) has been deleted
6 years, 4 months ago (2014-08-25 22:26:11 UTC) #2
jdduke (slow)
jdduke@chromium.org changed reviewers: + tdresser@chromium.org
6 years, 3 months ago (2014-08-27 15:11:22 UTC) #3
jdduke (slow)
tdresser@: Do you feel this patch is worth pursuing? In practice, the performance win isn't ...
6 years, 3 months ago (2014-08-27 15:11:22 UTC) #4
jdduke (slow)
tdresser@: Alright, I think this is good for review. There's one remaining integration test on ...
6 years, 2 months ago (2014-10-16 17:01:59 UTC) #5
tdresser
LGTM, with nits. https://codereview.chromium.org/502993004/diff/610001/content/browser/renderer_host/input/motion_event_android_unittest.cc File content/browser/renderer_host/input/motion_event_android_unittest.cc (right): https://codereview.chromium.org/502993004/diff/610001/content/browser/renderer_host/input/motion_event_android_unittest.cc#newcode156 content/browser/renderer_host/input/motion_event_android_unittest.cc:156: NULL, These (and other occurrences of ...
6 years, 2 months ago (2014-10-20 15:19:15 UTC) #6
jdduke (slow)
https://codereview.chromium.org/502993004/diff/610001/content/browser/renderer_host/input/motion_event_android_unittest.cc File content/browser/renderer_host/input/motion_event_android_unittest.cc (right): https://codereview.chromium.org/502993004/diff/610001/content/browser/renderer_host/input/motion_event_android_unittest.cc#newcode156 content/browser/renderer_host/input/motion_event_android_unittest.cc:156: NULL, On 2014/10/20 15:19:15, tdresser wrote: > These (and ...
6 years, 2 months ago (2014-10-21 22:19:58 UTC) #7
jdduke (slow)
sky@: PTAL for owner approval of ui/events/test and ui/events/OWNERS? I'm not sure when sadrul@ will ...
6 years, 2 months ago (2014-10-21 22:53:44 UTC) #9
sky
https://codereview.chromium.org/502993004/diff/670001/ui/events/test/motion_event_test_utils.h File ui/events/test/motion_event_test_utils.h (right): https://codereview.chromium.org/502993004/diff/670001/ui/events/test/motion_event_test_utils.h#newcode18 ui/events/test/motion_event_test_utils.h:18: bool operator==(const MotionEvent& lhs, const MotionEvent& rhs); I would ...
6 years, 2 months ago (2014-10-22 00:01:04 UTC) #10
jdduke (slow)
https://codereview.chromium.org/502993004/diff/670001/ui/events/test/motion_event_test_utils.h File ui/events/test/motion_event_test_utils.h (right): https://codereview.chromium.org/502993004/diff/670001/ui/events/test/motion_event_test_utils.h#newcode18 ui/events/test/motion_event_test_utils.h:18: bool operator==(const MotionEvent& lhs, const MotionEvent& rhs); On 2014/10/22 ...
6 years, 2 months ago (2014-10-22 00:15:56 UTC) #11
tdresser
On 2014/10/22 00:15:56, jdduke wrote: > https://codereview.chromium.org/502993004/diff/670001/ui/events/test/motion_event_test_utils.h > File ui/events/test/motion_event_test_utils.h (right): > > https://codereview.chromium.org/502993004/diff/670001/ui/events/test/motion_event_test_utils.h#newcode18 > ...
6 years, 2 months ago (2014-10-22 12:18:02 UTC) #12
jdduke (slow)
OK, stringification is now explicit with ToString (also moved MockMotionEvent into motion_event_test_utils.h).
6 years, 2 months ago (2014-10-22 18:30:46 UTC) #13
sky
LGTM
6 years, 2 months ago (2014-10-22 20:22:15 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/502993004/690001
6 years, 2 months ago (2014-10-23 16:26:48 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tests_recipe/builds/21258)
6 years, 2 months ago (2014-10-23 18:16:47 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/502993004/710001
6 years, 2 months ago (2014-10-24 16:42:51 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/502993004/710001
6 years, 2 months ago (2014-10-24 16:42:59 UTC) #21
commit-bot: I haz the power
Committed patchset #12 (id:710001)
6 years, 2 months ago (2014-10-24 17:35:35 UTC) #22
commit-bot: I haz the power
6 years, 2 months ago (2014-10-24 17:36:31 UTC) #23
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/b5a33976eb45777e6ca7c8785677d4df08eb04fd
Cr-Commit-Position: refs/heads/master@{#301136}

Powered by Google App Engine
This is Rietveld 408576698