aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-02-25 14:09:45 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-25 14:09:46 -0800
commit5f5a8d7599b8e248633ac122294b7a01401fedcb (patch)
treee598536d87f52a473f82123097418fe6e2dccb6d /src/gpu/effects
parent570d2f81a65fc868d6300a7edf34c0d5d048c5d6 (diff)
adding preabandon flag to DM
Diffstat (limited to 'src/gpu/effects')
-rw-r--r--src/gpu/effects/GrTextureStripAtlas.cpp6
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();