Fix a crash in WrappedSkImage and canvas issues in SharedImageAHB
wrapped_sk_image()->GetSkSurface() may return nullptr if the deive is lost, so we need to check the result before using it to avoid crash. This CL also improves SharedImageAHB to recreate SkSurface, if surface properties are changed. And it also resets the canvas when write access is done. Bug: None Change-Id: Ic9a7a966ac7063a74f650c1b04c2ee6ba475d918 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2145467 Auto-Submit: Peng Huang <penghuang@chromium.org> Reviewed-by:Jonathan Backer <backer@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org> Cr-Commit-Position: refs/heads/master@{#759251}
Showing
Please register or sign in to comment