summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2015-10-02 14:19:39 -0700
committerSteve Kondik <steve@cyngn.com>2015-11-07 05:40:46 -0800
commit4707b5c29128da077bed583a16f072a61998ed60 (patch)
treedffec8592202437435c39e4a71a1ebd883227554 /libs
parent05f1d7b3fdd871dd5d5d4be2346389e1e38ce4a3 (diff)
downloadframeworks_base-4707b5c29128da077bed583a16f072a61998ed60.zip
frameworks_base-4707b5c29128da077bed583a16f072a61998ed60.tar.gz
frameworks_base-4707b5c29128da077bed583a16f072a61998ed60.tar.bz2
Don't unregister Fonts from renderer at destruction
bug:24584749 Fonts are only destroyed when the renderer is destroyed, this prevents modifying the FontRenderer's LruCache while it's being iterated through in FontRenderer::~FontRenderer. Change-Id: I0e2c9f87981bfa50454ec8689df05851839e288e
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/FontRenderer.cpp8
-rw-r--r--libs/hwui/FontRenderer.h2
-rw-r--r--libs/hwui/font/Font.cpp2
3 files changed, 0 insertions, 12 deletions
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp
index 35051b7..54cfaea 100644
--- a/libs/hwui/FontRenderer.cpp
+++ b/libs/hwui/FontRenderer.cpp
@@ -683,14 +683,6 @@ bool FontRenderer::renderTextOnPath(const SkPaint* paint, const Rect* clip, cons
return mDrawn;
}
-void FontRenderer::removeFont(const Font* font) {
- mActiveFonts.remove(font->getDescription());
-
- if (mCurrentFont == font) {
- mCurrentFont = nullptr;
- }
-}
-
void FontRenderer::blurImage(uint8_t** image, int32_t width, int32_t height, float radius) {
uint32_t intRadius = Blur::convertRadiusToInt(radius);
#ifdef ANDROID_ENABLE_RENDERSCRIPT
diff --git a/libs/hwui/FontRenderer.h b/libs/hwui/FontRenderer.h
index dfb107c..3da20ee 100644
--- a/libs/hwui/FontRenderer.h
+++ b/libs/hwui/FontRenderer.h
@@ -151,8 +151,6 @@ private:
float x3, float y3, float u3, float v3,
float x4, float y4, float u4, float v4, CacheTexture* texture);
- void removeFont(const Font* font);
-
void checkTextureUpdate();
void setTextureDirty() {
diff --git a/libs/hwui/font/Font.cpp b/libs/hwui/font/Font.cpp
index 5de64a4..762f2bb 100644
--- a/libs/hwui/font/Font.cpp
+++ b/libs/hwui/font/Font.cpp
@@ -64,8 +64,6 @@ Font::FontDescription::FontDescription(const SkPaint* paint, const SkMatrix& ras
}
Font::~Font() {
- mState->removeFont(this);
-
for (uint32_t i = 0; i < mCachedGlyphs.size(); i++) {
delete mCachedGlyphs.valueAt(i);
}