Fix crash with new LookupGammaFontRenderer
Bug #6853934 Change-Id: I15e6ca73bfe00eff1a37c4b9d2f7f709ee018eb6
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -59,6 +59,7 @@ public:
|
||||
|
||||
void clear() {
|
||||
delete mRenderer;
|
||||
mRenderer = NULL;
|
||||
}
|
||||
|
||||
void flush() {
|
||||
|
||||
Reference in New Issue
Block a user