| Index: src/gpu/GrTextStrike.cpp
|
| diff --git a/src/gpu/GrTextStrike.cpp b/src/gpu/GrTextStrike.cpp
|
| index d3214a7012e06b96fa85481340ab7ad3728b2653..47b6216665ae0626e08e111c985ee29930be8f0b 100644
|
| --- a/src/gpu/GrTextStrike.cpp
|
| +++ b/src/gpu/GrTextStrike.cpp
|
| @@ -69,10 +69,12 @@ void GrFontCache::freeAll() {
|
| }
|
|
|
| void GrFontCache::purgeExceptFor(GrTextStrike* preserveStrike) {
|
| + SkASSERT(NULL != preserveStrike);
|
| GrTextStrike* strike = fTail;
|
| bool purge = true;
|
| + GrMaskFormat maskFormat = preserveStrike->fMaskFormat;
|
| while (strike) {
|
| - if (strike == preserveStrike) {
|
| + if (strike == preserveStrike || maskFormat != strike->fMaskFormat) {
|
| strike = strike->fPrev;
|
| continue;
|
| }
|
| @@ -94,9 +96,11 @@ void GrFontCache::purgeExceptFor(GrTextStrike* preserveStrike) {
|
| }
|
|
|
| void GrFontCache::freeAtlasExceptFor(GrTextStrike* preserveStrike) {
|
| + SkASSERT(NULL != preserveStrike);
|
| GrTextStrike* strike = fTail;
|
| + GrMaskFormat maskFormat = preserveStrike->fMaskFormat;
|
| while (strike) {
|
| - if (strike == preserveStrike) {
|
| + if (strike == preserveStrike || maskFormat != strike->fMaskFormat) {
|
| strike = strike->fPrev;
|
| continue;
|
| }
|
|
|