summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiarhei Vishniakou <svv@google.com>2020-07-07 10:58:09 -0500
committerSiarhei Vishniakou <svv@google.com>2020-07-10 20:37:58 +0000
commita7c7360213e8b2969cb465cf488328c212eb22bf (patch)
tree7f3f530b1a19fc06da2ecc5665327f29a85e02e7
parentf708228c0255cadaa23d9b0a7129c495bd95b818 (diff)
downloadnative-a7c7360213e8b2969cb465cf488328c212eb22bf.tar.gz
Increase touch video buffer size
We are currently limited to having 10 buffers max inside a TouchVideoDevice. That means that if too many frames are generated, we will start dropping them. The dropped frames will never make it to the InputClassifier HAL. Now that touch is at 180 Hz, this becomes even more of a problem. If the system is running slow, it is easy to overrun the buffer. Increase the buffer size to avoid dropping frames. Bug: 160016140 Test: none Change-Id: I3662236a518e908cec94c31bf7604eb830c3308a Merged-In: I3662236a518e908cec94c31bf7604eb830c3308a (cherry picked from commit 487938ec81c70076852b13d8ee49bf37bfa8290a)
-rw-r--r--services/inputflinger/reader/include/TouchVideoDevice.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/inputflinger/reader/include/TouchVideoDevice.h b/services/inputflinger/reader/include/TouchVideoDevice.h
index 5a32443f29..7de9b830b2 100644
--- a/services/inputflinger/reader/include/TouchVideoDevice.h
+++ b/services/inputflinger/reader/include/TouchVideoDevice.h
@@ -102,7 +102,7 @@ private:
* How many buffers to keep for the internal queue. When the internal buffer
* exceeds this capacity, oldest frames will be dropped.
*/
- static constexpr size_t MAX_QUEUE_SIZE = 10;
+ static constexpr size_t MAX_QUEUE_SIZE = 20;
std::vector<TouchVideoFrame> mFrames;
/**