Fix storing VkPipelineCache in HWUI's shader cache breaking persistence
See b/268205519 for the full analysis and description, but the summary is mSavePending could previously get stuck in the true state, preventing the shader cache from being written to disk for the rest of an app's lifecycle. This stuck state seems to occur on every app launch after the first, unless any shaders are compiled in the first 4 seconds. This occurs frequently, as the shaders initially required by an app in its first 4 seconds were likely compiled on its first launch and already available in its persistent cache, thus not necessitating new compilation in that initial window and triggering the failure case. This seems to have serious jank implications, particularly for SysUI. Note: time is now represented in milliseconds to make testing easier. Fixes: 268205519 Bug: 268205519 Bug: 225211273 Test: `atest hwui_unit_tests:ShaderCacheTest` (before and after fix) Change-Id: I102d75df4c61f9b3012dd5d956dc37435d5b5a84
Loading
Please register or sign in to comment