Index: src/gpu/GrTextContext.cpp |
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp |
index 1f25c906fbe1d262a57be58352a8de2a5e740d06..7a9df7c8743a2977f3c0c83d36b3dfef9784c333 100644 |
--- a/src/gpu/GrTextContext.cpp |
+++ b/src/gpu/GrTextContext.cpp |
@@ -16,11 +16,15 @@ |
#include "GrTextStrike.h" |
#include "GrTextStrike_impl.h" |
#include "SkPath.h" |
+#include "SkRTConf.h" |
#include "SkStrokeRec.h" |
#include "effects/GrCustomCoordsTextureEffect.h" |
static const int kGlyphCoordsAttributeIndex = 1; |
+SK_CONF_DECLARE(bool, c_DumpFontCache, "gpu.dumpFontCache", false, |
+ "Dump the contents of the font cache before every purge."); |
+ |
void GrTextContext::flushGlyphs() { |
if (NULL == fDrawTarget) { |
return; |
@@ -161,6 +165,10 @@ void GrTextContext::drawPackedGlyph(GrGlyph::PackedID packed, |
goto HAS_ATLAS; |
} |
+ if (c_DumpFontCache) { |
+ fContext->getFontCache()->dump(); |
+ } |
+ |
// before we purge the cache, we must flush any accumulated draws |
this->flushGlyphs(); |
fContext->flush(); |