summaryrefslogtreecommitdiff
path: root/libs/hwui/OpenGLRenderer.cpp
diff options
context:
space:
mode:
author Romain Guy <romainguy@android.com> 2010-08-07 23:49:15 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2010-08-07 23:49:15 -0700
commit1ad7343409442a4a027c0092d07beff1b412a7dc (patch)
tree03181a0402d8728d64c1314406276333ace652e7 /libs/hwui/OpenGLRenderer.cpp
parenta30e7e0b798eecf4d5ef7b3e2ce89a1edea3900d (diff)
parent9cccc2b9bdd4850a3f9679569aaec3ab98477a5d (diff)
Merge "Enforce maximum texture size."
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;