summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramVertexFixedFunction.java
diff options
context:
space:
mode:
authorKarthik Ravi Shankar <karthikrs@google.com>2017-10-04 13:30:13 -0700
committerKarthik Ravi Shankar <karthikrs@google.com>2017-10-04 15:18:55 -0700
commit66855315850bda0a0184a56bdd3099f4faa8b984 (patch)
tree2c748710eb3e5bf683666286df2c6367f7422db3 /rs/java/android/renderscript/ProgramVertexFixedFunction.java
parentb986ebce7583e1409f59d975981f9bdf6aa34151 (diff)
Fix race condition when entering low persistence mode
The problem is that - 1) When the device enters a VR activity directly from screen off, there is a chance the device is not in low persistence mode and ghosting is really bad. 2) LocalDisplayAdapter gets to know that the device is in VR mode later than PowerManagerService due to scheduling of it's runnable. 3) The call to Lights HAL to change the display mode only is made only when there is a brightness change. 4) This opens up a race condition where the PowerManagerService knows device is in VR mode and changes the brightness to VR brightness before the LocalDisplayAdapter knows about the VR mode change. 5) Since there is no more brightness change to be done, the device is not in low persistence mode creating really bad UX. Fix is to trigger a brightness change call when there is a Display state change so that LocalDisplayAdapter sets the low persistence mode correctly always. Bug: 67114120 Test: 1) Lock and unlock to VR puts the device in low persistence mode correctly always. 2) Lock and unlock in normal mode changes brightness correctly. 3) Even with lockscreen, all of the use cases above work correctly. Change-Id: Ic0e6d92ba145aaa94f86e6d53ab5aa08cbbae10c Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
Diffstat (limited to 'rs/java/android/renderscript/ProgramVertexFixedFunction.java')
0 files changed, 0 insertions, 0 deletions