always flush accumulated draws before we purge the font cache



git-svn-id: http://skia.googlecode.com/svn/trunk@1051 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrTextContext.cpp b/gpu/src/GrTextContext.cpp
index 2230af2..e2c81c7 100644
--- a/gpu/src/GrTextContext.cpp
+++ b/gpu/src/GrTextContext.cpp
@@ -176,7 +176,9 @@
         if (fStrike->getGlyphAtlas(glyph, scaler)) {
             goto HAS_ATLAS;
         }
-        // must do this to flush inorder buffering before we purge
+
+        // before we purge the cache, we must flush any accumulated draws
+        this->flushGlyphs();
         fContext->flushText();
 
         // try to purge
@@ -185,11 +187,7 @@
             goto HAS_ATLAS;
         }
 
-        // Draw as a path, so we flush any accumulated glyphs first
-        this->flushGlyphs();
-
         if (NULL == glyph->fPath) {
-
             GrPath* path = new GrPath;
             if (!scaler->getGlyphPath(glyph->glyphID(), path)) {
                 // flag the glyph as being dead?