From 774831a4e80f49cfec3cb78f684bd44cb19a7b2a Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Thu, 20 Apr 2017 10:19:33 -0400 Subject: [PATCH] Add abandoned GPU check to createTextureProxy I'm guessing the crash is actually on the first 'fGpu' reference in createTextureProxy after the GPU context has been abandoned. Bug: 712929 Change-Id: Ia6742da7073c2320e592b42fcf2d0e7c04eeefb9 Reviewed-on: https://skia-review.googlesource.com/13966 Reviewed-by: Greg Daniel Commit-Queue: Robert Phillips --- src/gpu/GrResourceProvider.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp index 6299264..1226f9b 100644 --- a/src/gpu/GrResourceProvider.cpp +++ b/src/gpu/GrResourceProvider.cpp @@ -123,6 +123,12 @@ static bool make_info(int w, int h, GrPixelConfig config, SkImageInfo* ii) { sk_sp GrResourceProvider::createTextureProxy(const GrSurfaceDesc& desc, SkBudgeted budgeted, const GrMipLevel& mipLevel) { + ASSERT_SINGLE_OWNER + + if (this->isAbandoned()) { + return nullptr; + } + if (!mipLevel.fPixels) { return nullptr; } -- 2.7.4