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

Issue 2301073002: Optimization: avoid making 4 JNI calls to get touch device attributes. (Closed)

Created:
4 years, 3 months ago by Tobias Sargeant
Modified:
4 years, 3 months ago
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Optimization: avoid making 4 JNI calls to get touch device attributes. Each call (Get{Available|Primary}{Pointer|Hover}Type) does a separate iteration over the input device list, as well as incurring JNI call overhead. By fetching the Pointer and Hover types in one call, and then reusing the values, we can avoid unnecessary work on the WebView startup path. BUG=600060 Committed: https://crrev.com/4cef7d0449592119bc8bdee2b5a98c89543f4c03 Cr-Commit-Position: refs/heads/master@{#416644}

Patch Set 1 #

Total comments: 2

Patch Set 2 : remove unused APIs #

Patch Set 3 : Correct a spelling mistake. #

Total comments: 1

Patch Set 4 : Remove unneccessary functions from touch_device.cc #

Patch Set 5 : Fix windows compile issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -120 lines) Patch
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 1 chunk +6 lines, -4 lines 0 comments Download
M ui/android/java/src/org/chromium/ui/base/TouchDevice.java View 1 2 chunks +24 lines, -39 lines 0 comments Download
M ui/base/touch/touch_device.h View 1 2 2 chunks +5 lines, -4 lines 0 comments Download
M ui/base/touch/touch_device.cc View 1 2 3 1 chunk +4 lines, -9 lines 0 comments Download
M ui/base/touch/touch_device_android.cc View 1 3 chunks +13 lines, -12 lines 0 comments Download
M ui/base/touch/touch_device_linux.cc View 1 3 chunks +26 lines, -24 lines 0 comments Download
M ui/base/touch/touch_device_win.cc View 1 2 3 4 4 chunks +30 lines, -28 lines 0 comments Download

Messages

Total messages: 32 (22 generated)
Tobias Sargeant
4 years, 3 months ago (2016-09-01 15:27:25 UTC) #3
sadrul
Looks reasonable. But I think we should remove the existing API too, since they are ...
4 years, 3 months ago (2016-09-01 23:22:36 UTC) #7
Tobias Sargeant
+miguelg for ui/android
4 years, 3 months ago (2016-09-02 12:08:39 UTC) #11
Tobias Sargeant
https://codereview.chromium.org/2301073002/diff/1/ui/base/touch/touch_device.h File ui/base/touch/touch_device.h (right): https://codereview.chromium.org/2301073002/diff/1/ui/base/touch/touch_device.h#newcode71 ui/base/touch/touch_device.h:71: UI_BASE_EXPORT HoverType GetPrimaryHoverType(); On 2016/09/01 23:22:35, sadrul wrote: > ...
4 years, 3 months ago (2016-09-02 12:18:09 UTC) #12
sadrul
Thanks! lgtm https://codereview.chromium.org/2301073002/diff/40001/ui/base/touch/touch_device.cc File ui/base/touch/touch_device.cc (right): https://codereview.chromium.org/2301073002/diff/40001/ui/base/touch/touch_device.cc#newcode51 ui/base/touch/touch_device.cc:51: } I think you can remove the ...
4 years, 3 months ago (2016-09-02 18:36:30 UTC) #13
Tobias Sargeant
Hi Theresa, if you have time, could you please take a look at ui/android? Thanks.
4 years, 3 months ago (2016-09-05 15:43:25 UTC) #18
Theresa
lgtm
4 years, 3 months ago (2016-09-06 16:35:23 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2301073002/80001
4 years, 3 months ago (2016-09-06 16:40:31 UTC) #28
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 3 months ago (2016-09-06 16:44:50 UTC) #30
commit-bot: I haz the power
4 years, 3 months ago (2016-09-06 16:48:23 UTC) #32
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/4cef7d0449592119bc8bdee2b5a98c89543f4c03
Cr-Commit-Position: refs/heads/master@{#416644}

Powered by Google App Engine
This is Rietveld 408576698