summaryrefslogtreecommitdiff
path: root/libs/hwui/OpenGLRenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index db8c8637aa67..5d30b1ad0b91 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -436,6 +436,7 @@ void OpenGLRenderer::drawBitmap(SkBitmap* bitmap, float left, float top, const S
}
const Texture* texture = mTextureCache.get(bitmap);
+ if (!texture) return;
const AutoTexture autoCleanup(texture);
drawTextureRect(left, top, right, bottom, texture, paint);
@@ -451,6 +452,7 @@ void OpenGLRenderer::drawBitmap(SkBitmap* bitmap, const SkMatrix* matrix, const
}
const Texture* texture = mTextureCache.get(bitmap);
+ if (!texture) return;
const AutoTexture autoCleanup(texture);
drawTextureRect(r.left, r.top, r.right, r.bottom, texture, paint);
@@ -465,6 +467,7 @@ void OpenGLRenderer::drawBitmap(SkBitmap* bitmap,
}
const Texture* texture = mTextureCache.get(bitmap);
+ if (!texture) return;
const AutoTexture autoCleanup(texture);
const float width = texture->width;
@@ -489,6 +492,7 @@ void OpenGLRenderer::drawPatch(SkBitmap* bitmap, Res_png_9patch* patch,
}
const Texture* texture = mTextureCache.get(bitmap);
+ if (!texture) return;
const AutoTexture autoCleanup(texture);
int alpha;
@@ -617,6 +621,7 @@ void OpenGLRenderer::drawPath(SkPath* path, SkPaint* paint) {
glActiveTexture(gTextureUnits[textureUnit]);
const PathTexture* texture = mPathCache.get(path, paint);
+ if (!texture) return;
const AutoTexture autoCleanup(texture);
int alpha;