[OT-PW] Make entries in PaintWorkletImageCache ref counted
Currently, the PaintWorkletImageCache keeps a hashmap from PaintWorkletInput to a PaintRecord. The problem is that the PaintRecord could be used by multiple tiles for rasterization, while the main thread might be trying to purge the cache. This CL makes the PaintRecord ref counted. Whenever a tile is using it for rasterization, the counter will increment. When the rasterization is done, the counter will decrement. Bug: 907897 Change-Id: Idaf1a1f191c084b7531c3a17e5163288e8ba1d4b Reviewed-on: https://chromium-review.googlesource.com/c/1439761Reviewed-by:vmpstr <vmpstr@chromium.org> Commit-Queue: Xida Chen <xidachen@chromium.org> Cr-Commit-Position: refs/heads/master@{#626872}
Showing
Please register or sign in to comment