diff options
| author | 2012-07-20 11:19:21 -0700 | |
|---|---|---|
| committer | 2012-07-20 11:19:22 -0700 | |
| commit | e4c9dd17be9bb1fbaca56e16912a6ddfbf2c386f (patch) | |
| tree | 62dca4c0abad88053ea6e14f52fe70dc6550ccf3 | |
| parent | 2eeeec248a38ff33999c83f4b8d5bab7d50e79d2 (diff) | |
| parent | 0aa87bbfc41e8b5f52de701ac17b4e66a7a7b609 (diff) | |
Merge "Fix crash with new LookupGammaFontRenderer Bug #6853934"
| -rw-r--r-- | libs/hwui/FontRenderer.cpp | 3 | ||||
| -rw-r--r-- | libs/hwui/FontRenderer.h | 5 | ||||
| -rw-r--r-- | libs/hwui/GammaFontRenderer.h | 1 |
3 files changed, 4 insertions, 5 deletions
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp index 3b3691c637d1..eeb37cbe08c1 100644 --- a/libs/hwui/FontRenderer.cpp +++ b/libs/hwui/FontRenderer.cpp @@ -697,8 +697,7 @@ void FontRenderer::cacheBitmap(const SkGlyph& glyph, CachedGlyphInfo* cachedGlyp } CacheTexture* FontRenderer::createCacheTexture(int width, int height, bool allocate) { - uint8_t* textureMemory = NULL; - CacheTexture* cacheTexture = new CacheTexture(textureMemory, width, height); + CacheTexture* cacheTexture = new CacheTexture(width, height); if (allocate) { allocateTextureMemory(cacheTexture); diff --git a/libs/hwui/FontRenderer.h b/libs/hwui/FontRenderer.h index 2ab680e0e379..b7b4ec9683f9 100644 --- a/libs/hwui/FontRenderer.h +++ b/libs/hwui/FontRenderer.h @@ -61,9 +61,8 @@ class FontRenderer; class CacheTexture { public: - CacheTexture() { } - CacheTexture(uint8_t* texture, uint16_t width, uint16_t height) : - mTexture(texture), mTextureId(0), mWidth(width), mHeight(height), + CacheTexture(uint16_t width, uint16_t height) : + mTexture(NULL), mTextureId(0), mWidth(width), mHeight(height), mLinearFiltering(false) { } ~CacheTexture() { if (mTexture) { diff --git a/libs/hwui/GammaFontRenderer.h b/libs/hwui/GammaFontRenderer.h index 9180778e9aa9..c4a50bed3ad2 100644 --- a/libs/hwui/GammaFontRenderer.h +++ b/libs/hwui/GammaFontRenderer.h @@ -59,6 +59,7 @@ public: void clear() { delete mRenderer; + mRenderer = NULL; } void flush() { |