summaryrefslogtreecommitdiff
path: root/libs/hwui/TextDropShadowCache.cpp
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2013-04-12 17:31:25 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2013-04-12 17:31:26 +0000
commit8d4c23b9c32f8c0328ebca538bb801716fe4478a (patch)
tree36e0b21058f5223c4b8d6782745ed7cb5edef4be /libs/hwui/TextDropShadowCache.cpp
parent737a3611038d6e3b114538335001525e7ad2b5da (diff)
parentcf51a4199835e9604aa4c8b3854306f8fbabbf33 (diff)
Merge "Introduce PixelBuffer API to enable PBOs" into jb-mr2-dev
Diffstat (limited to 'libs/hwui/TextDropShadowCache.cpp')
-rw-r--r--libs/hwui/TextDropShadowCache.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hwui/TextDropShadowCache.cpp b/libs/hwui/TextDropShadowCache.cpp
index f1f35bd1711c..6976eaa3d70e 100644
--- a/libs/hwui/TextDropShadowCache.cpp
+++ b/libs/hwui/TextDropShadowCache.cpp
@@ -178,6 +178,10 @@ ShadowTexture* TextDropShadowCache::get(SkPaint* paint, const char* text, uint32
FontRenderer::DropShadow shadow = mRenderer->renderDropShadow(&paintCopy, text, 0,
len, numGlyphs, radius, positions);
+ if (!shadow.image) {
+ return NULL;
+ }
+
texture = new ShadowTexture;
texture->left = shadow.penX;
texture->top = shadow.penY;