| Index: src/gpu/GrTextContext.cpp
|
| diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
|
| index 1f25c906fbe1d262a57be58352a8de2a5e740d06..5a6183965cf6422585baa7befa56299138c90488 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,12 @@ void GrTextContext::drawPackedGlyph(GrGlyph::PackedID packed,
|
| goto HAS_ATLAS;
|
| }
|
|
|
| + if (c_DumpFontCache) {
|
| +#ifdef SK_DEVELOPER
|
| + fContext->getFontCache()->dump();
|
| +#endif
|
| + }
|
| +
|
| // before we purge the cache, we must flush any accumulated draws
|
| this->flushGlyphs();
|
| fContext->flush();
|
|
|