gpu: Fix GrShaderCache accounting for storing duplicate keys.
The GrShaderCache currently assumes that it can't be populated with an entry having the same key twice. This is incorrect in 2 scenarios. 1) If skia fails to link the cached binary, it will re-generate and store a new copy. 2) If skia uses a shader before it is loaded off the disk cache, we will find an existing entry in the memory cache when the disk cache entry is being populated. The above scenarios can result in errors in the internal accounting for memory used. Fix them. R=ericrk@chromium.org Bug: 868121 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: Ifd4c1e872379b54d7c659d62ff6af09eeaad2b46 Reviewed-on: https://chromium-review.googlesource.com/1152552 Commit-Queue: Khushal <khushalsagar@chromium.org> Reviewed-by:Eric Karl <ericrk@chromium.org> Cr-Commit-Position: refs/heads/master@{#578730}
Showing
Please register or sign in to comment