diff options
author | Robert Phillips <robertphillips@google.com> | 2017-04-20 10:19:33 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-20 15:17:59 +0000 |
commit | 774831a4e80f49cfec3cb78f684bd44cb19a7b2a (patch) | |
tree | 9e9bffcd236e8f1e9cd79470a67ef973771668f1 /src | |
parent | ad8b5dc69cd613cc8974999f9e7c94a19eb01fec (diff) |
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 <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrResourceProvider.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp index 6299264e21..1226f9b9f6 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<GrTextureProxy> GrResourceProvider::createTextureProxy(const GrSurfaceDesc& desc, SkBudgeted budgeted, const GrMipLevel& mipLevel) { + ASSERT_SINGLE_OWNER + + if (this->isAbandoned()) { + return nullptr; + } + if (!mipLevel.fPixels) { return nullptr; } |