Have multiple plotmgrs, one for each mask format.
Only flush/purge those strikes that match our format.

R=bsalomon@google.com

Review URL: https://codereview.chromium.org/24047005

git-svn-id: http://skia.googlecode.com/svn/trunk@11303 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrTextStrike.cpp b/src/gpu/GrTextStrike.cpp
index d3214a7..47b6216 100644
--- a/src/gpu/GrTextStrike.cpp
+++ b/src/gpu/GrTextStrike.cpp
@@ -69,10 +69,12 @@
 }
 
 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::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;
         }