Switch SoftwareRenderer to use tryAllocPixels()
SkBitmap allocations were using allocPixels() which will crash on OOM. In order to indicate the crash is due to OOM use tryAllocPixels() and then call base::TerminateBecauseOutOfMemory() on failure. This will improve crash reports. If SkBitmap allocation fails for a CopyOutputRequest we can handle the OOM gracefully, since the caller has to be able to handle failed requests regardless. Bug: 995411 Change-Id: Ifad190badca49c948e5ae612dd33df39ef5923f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1993667Reviewed-by:weiliangc <weiliangc@chromium.org> Commit-Queue: kylechar <kylechar@chromium.org> Cr-Commit-Position: refs/heads/master@{#730243}
Showing
Please register or sign in to comment