commit | c6ae4bbc44183811ad84abf5abc56a96843545bc | [log] [tgz] |
---|---|---|
author | Edgar Arriaga <edgararriaga@google.com> | Thu Apr 16 18:46:48 2020 -0700 |
committer | Edgar Arriaga <edgararriaga@google.com> | Mon Apr 27 13:49:25 2020 -0700 |
tree | 548f4c662072d2c2ff3bf84f6fbdd94efe8412f3 | |
parent | fbedbecbe53428412e832dd1703bc3acc65e49e9 [diff] [blame] |
Optimization: Restrict signing to ACTION_UP and ACTION_DOWN while doing a motion gesture such as scrolling apps Savings. ~2.5% of total system_server time while scrolling on apps drawer screen. Baseline: https://pprof.corp.google.com/?id=732307aa60aa82bf478b0c3f0e6de6be&ignore=sendMessage https://screenshot.googleplex.com/JpWt25tXRJO Optimized: https://pprof.corp.google.com/?id=5040d255411f407662a7f2da0109ca48&ignore=sendMessage https://screenshot.googleplex.com/x81k7vUUKdd Test: atest inputflinger_tests Change-Id: I52dd33f8203fe62bfcbde7be5a1ac45c46064585
diff --git a/libs/input/InputTransport.cpp b/libs/input/InputTransport.cpp index ef7cc7d..11af23e 100644 --- a/libs/input/InputTransport.cpp +++ b/libs/input/InputTransport.cpp
@@ -468,7 +468,7 @@ msg.body.key.deviceId = deviceId; msg.body.key.source = source; msg.body.key.displayId = displayId; - msg.body.key.hmac = hmac; + msg.body.key.hmac = std::move(hmac); msg.body.key.action = action; msg.body.key.flags = flags; msg.body.key.keyCode = keyCode; @@ -526,7 +526,7 @@ msg.body.motion.deviceId = deviceId; msg.body.motion.source = source; msg.body.motion.displayId = displayId; - msg.body.motion.hmac = hmac; + msg.body.motion.hmac = std::move(hmac); msg.body.motion.action = action; msg.body.motion.actionButton = actionButton; msg.body.motion.flags = flags;