summaryrefslogtreecommitdiff
path: root/opengl/libagl/TextureObjectManager.cpp
diff options
context:
space:
mode:
author Jim Kaye <jameskaye@google.com> 2017-05-08 09:07:27 -0700
committer Jim Kaye <jameskaye@google.com> 2017-05-08 16:31:52 +0000
commit663720b29f412756b8599897df9f8e32eb930be2 (patch)
tree7b36230ffd8c01d058fa8c36c30b909c2225067e /opengl/libagl/TextureObjectManager.cpp
parent584bc3cebf3f23d378fc7ed06e71c5d1722373dd (diff)
Fix enforcement of sensor's slowest rate
This code calculates a sensor's maximum sample period in nanoseconds. This is stored as a 64-bit value, as required for periods greater than ~2.1 seconds. The calculation was done with 32-bit arithmetic, sometimes resulting in overflow. This caused the sensor to run at its maximum rate. (The requested period is first clipped to the maximum period. When the maximum period appears negative, it is always used. The now-negative period is then clipped to the minimum period, resulting in the sensor's maximum supported rate.) Bug: 37465457 Test: Verified correct operation with Goldfish accelerometer, which has a 60-second maximum period. Change-Id: Ic75a9dc7c4e7c9ca690eafbfa51ee50540ca5aaf
Diffstat (limited to 'opengl/libagl/TextureObjectManager.cpp')
0 files changed, 0 insertions, 0 deletions