Skip to content
Commit 193cd967 authored by Nolan Scobie's avatar Nolan Scobie
Browse files

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
parent 9a2b9d08
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment