Add abandoned context check to SkImage::MakeFromDeferredTextureImageData

Change-Id: Ibcae793339cfaf9dae8cb9122f387def535ce1bc
Reviewed-on: https://skia-review.googlesource.com/23040
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Brian Salomon 2017-07-13 09:23:21 -04:00 committed by Skia Commit-Bot
parent 68990be759
commit 228482a709

View File

@ -891,7 +891,7 @@ sk_sp<SkImage> SkImage::MakeFromDeferredTextureImageData(GrContext* context, con
}
const DeferredTextureImage* dti = reinterpret_cast<const DeferredTextureImage*>(data);
if (!context || context->uniqueID() != dti->fContextUniqueID) {
if (!context || context->uniqueID() != dti->fContextUniqueID || context->abandoned()) {
return nullptr;
}
int mipLevelCount = dti->fMipMapLevelCount;