Release canvas software image decode locks eagerly
In https://chromium-review.googlesource.com/c/chromium/src/+/1315962, code was added to add a separate ImageDecodeCache per color space (rather than storing color space on the image objects). However, because CanvasResourceProviders post a task to clean up these locks, the high water mark for discardable memory could be much higher if multiple canvases with different color spaces are used. This has resulted in crashes in shared memory allocation. To work around this for software mode, release locks immediately. This lets the software decodes rely on the discardable system itself to handle the caching behavior instead of blindly locking them until javascript was done executing. Ideally all of this code can be eliminated in the future, which is why a workaround is employed here instead of something more complicated. Bug: 907100 Change-Id: If6380b9e40f6334c125581c2c65f72543d6bb745 Reviewed-on: https://chromium-review.googlesource.com/c/1351773Reviewed-by:Fernando Serboncini <fserb@chromium.org> Reviewed-by:
Khushal <khushalsagar@chromium.org> Commit-Queue: enne <enne@chromium.org> Cr-Commit-Position: refs/heads/master@{#611331}
Showing
Please register or sign in to comment