commit | 15a0515c89e17bb6b914601d7edba63a7cc3def3 | [log] [tgz] |
---|---|---|
author | bsalomon <bsalomon@google.com> | Wed Jun 15 09:25:22 2016 -0700 |
committer | Commit bot <commit-bot@chromium.org> | Wed Jun 15 09:25:22 2016 -0700 |
tree | 1c3f786f3dc832cf6b0442199221ed860db6bba7 | |
parent | 5bfd891d97fc4ac0b54aef0062474018d0e73389 [diff] |
Check for abandoned texture in GrTextureAdjuster::refTextureSafeForParams Cherry-pick for M52 BUG=chromium:618858 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2063313002 TBR=egdaniel@google.com Review-Url: https://codereview.chromium.org/2063313002 NOTREECHECKS=true NOTRY=true NOPRESUBMIT=true Review-Url: https://codereview.chromium.org/2066493006
diff --git a/src/gpu/GrTextureParamsAdjuster.cpp b/src/gpu/GrTextureParamsAdjuster.cpp index a91ba8a..1d06137 100644 --- a/src/gpu/GrTextureParamsAdjuster.cpp +++ b/src/gpu/GrTextureParamsAdjuster.cpp
@@ -164,6 +164,11 @@ CopyParams copyParams; const SkIRect* contentArea = this->contentAreaOrNull(); + if (!context) { + // The texture was abandoned. + return nullptr; + } + if (contentArea && GrTextureParams::kMipMap_FilterMode == params.filterMode()) { // If we generate a MIP chain for texture it will read pixel values from outside the content // area.