Fix janky navbar ripples -- incorrect timerslack values
If a thread is created while the parent thread is "Background", then the default timerslack value gets set to the current timerslack value of the parent (40ms). The default value is used when transitioning to "Foreground" -- so the effect is that the timerslack value becomes 40ms regardless of foreground/background. This does occur intermittently for systemui when creating its render thread (pretty often on hammerhead and has been seen on shamu). If this occurs, then some systemui animations like navbar ripples can wait for up to 40ms to draw a frame when they intended to wait 3ms -- jank. This fix is to explicitly set the foreground timerslack to 50us. A consequence of setting timerslack behind the process' back is that any custom values for timerslack get lost whenever the thread has transition between fg/bg. See Bug: 19398120 Change-Id: Idc259717f62fa2255f8bafbbf88b68c0043f29cf
Loading
Please register or sign in to comment