am eb1f5349: Merge "Fix for b7155617 race condition in TextLayoutCache.cpp" into jb-mr1-dev
* commit 'eb1f5349f8ac51e12e48497bbd2ae37badfe5009': Fix for b7155617 race condition in TextLayoutCache.cpp
This commit is contained in:
@@ -78,8 +78,10 @@ void TextLayoutCache::operator()(TextLayoutCacheKey& text, sp<TextLayoutValue>&
|
|||||||
/*
|
/*
|
||||||
* Cache clearing
|
* Cache clearing
|
||||||
*/
|
*/
|
||||||
void TextLayoutCache::clear() {
|
void TextLayoutCache::purgeCaches() {
|
||||||
|
AutoMutex _l(mLock);
|
||||||
mCache.clear();
|
mCache.clear();
|
||||||
|
mShaper->purgeCaches();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -965,8 +967,7 @@ sp<TextLayoutValue> TextLayoutEngine::getValue(const SkPaint* paint, const jchar
|
|||||||
|
|
||||||
void TextLayoutEngine::purgeCaches() {
|
void TextLayoutEngine::purgeCaches() {
|
||||||
#if USE_TEXT_LAYOUT_CACHE
|
#if USE_TEXT_LAYOUT_CACHE
|
||||||
mTextLayoutCache->clear();
|
mTextLayoutCache->purgeCaches();
|
||||||
mShaper->purgeCaches();
|
|
||||||
#if DEBUG_GLYPHS
|
#if DEBUG_GLYPHS
|
||||||
ALOGD("Purged TextLayoutEngine caches");
|
ALOGD("Purged TextLayoutEngine caches");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Clear the cache
|
* Clear the cache
|
||||||
*/
|
*/
|
||||||
void clear();
|
void purgeCaches();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TextLayoutShaper* mShaper;
|
TextLayoutShaper* mShaper;
|
||||||
|
|||||||
Reference in New Issue
Block a user