SkiaOutputDeviceVulkan: fix a crash in Reshape()
The crash is because the VulkanSurface::Reshape() could be fail for some reason, and then swap_chain_ in VulkanSurface could be nullptr, accessing the nullptr swap_chain causes the crash. Fix the problem by checking the return value of Reshape call of VulkanSurface. If it returns false, VulkanSurface::Reshape() will return false too. So the SkiaOutputSurfaceImplOnGpu will handle it, and mark context lost. TODO: investigate why reshape() fail with NVIDIA GPU. Bug: 1062728 Change-Id: I3defd05466d98448599e5fc836ac229c2ce35b84 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2139938Reviewed-by:Vasiliy Telezhnikov <vasilyt@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org> Cr-Commit-Position: refs/heads/master@{#757039}
Showing
Please register or sign in to comment