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
diff --git a/services/inputflinger/reader/include/TouchVideoDevice.h b/services/inputflinger/reader/include/TouchVideoDevice.h
index 5a32443..7de9b830 100644
--- a/services/inputflinger/reader/include/TouchVideoDevice.h
+++ b/services/inputflinger/reader/include/TouchVideoDevice.h
@@ -102,7 +102,7 @@
* 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;
/**