diff options
author | 2015-02-25 14:09:45 -0800 | |
---|---|---|
committer | 2015-02-25 14:09:46 -0800 | |
commit | 5f5a8d7599b8e248633ac122294b7a01401fedcb (patch) | |
tree | e598536d87f52a473f82123097418fe6e2dccb6d /src/gpu/effects | |
parent | 570d2f81a65fc868d6300a7edf34c0d5d048c5d6 (diff) |
adding preabandon flag to DM
BUG=skia:
Review URL: https://codereview.chromium.org/929243004
Diffstat (limited to 'src/gpu/effects')
-rw-r--r-- | src/gpu/effects/GrTextureStripAtlas.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/effects/GrTextureStripAtlas.cpp b/src/gpu/effects/GrTextureStripAtlas.cpp index 51aaf53540..65096bf650 100644 --- a/src/gpu/effects/GrTextureStripAtlas.cpp +++ b/src/gpu/effects/GrTextureStripAtlas.cpp @@ -92,6 +92,9 @@ int GrTextureStripAtlas::lockRow(const SkBitmap& data) { VALIDATE; if (0 == fLockedRows) { this->lockTexture(); + if (!fTexture) { + return -1; + } } int key = data.getGenerationID(); @@ -204,6 +207,9 @@ void GrTextureStripAtlas::lockTexture() { fTexture = fDesc.fContext->findAndRefCachedTexture(key); if (NULL == fTexture) { fTexture = fDesc.fContext->createTexture(texDesc, true, NULL, 0); + if (!fTexture) { + return; + } fDesc.fContext->addResourceToCache(key, fTexture); // This is a new texture, so all of our cache info is now invalid this->initLRU(); |