Index: src/gpu/GrTextStrike.cpp |
diff --git a/src/gpu/GrTextStrike.cpp b/src/gpu/GrTextStrike.cpp |
index e399c91f6c5b9bdfc5416f0585628eb073894870..7cab335d725abcbd7f78d4a1b1c531344c9eba73 100644 |
--- a/src/gpu/GrTextStrike.cpp |
+++ b/src/gpu/GrTextStrike.cpp |
@@ -10,6 +10,7 @@ |
#include "GrRectanizer.h" |
#include "GrTextStrike.h" |
#include "GrTextStrike_impl.h" |
+#include "SkString.h" |
SK_DEFINE_INST_COUNT(GrFontScaler) |
SK_DEFINE_INST_COUNT(GrKey) |
@@ -170,6 +171,23 @@ void GrFontCache::validate() const { |
} |
#endif |
+#ifdef SK_DEVELOPER |
+void GrFontCache::dump() const { |
+ static int gDumpCount = 0; |
+ for (int i = 0; i < kMaskFormatCount; ++i) { |
+ if (NULL != fAtlasMgr[i]) { |
+ GrTexture* texture = fAtlasMgr[i]->getTexture(); |
+ if (NULL != texture) { |
+ SkString filename; |
+ filename.printf("fontcache_%d%d.png", gDumpCount, i); |
+ texture->savePixels(filename.c_str()); |
+ } |
+ } |
+ } |
+ ++gDumpCount; |
+} |
+#endif |
+ |
/////////////////////////////////////////////////////////////////////////////// |
#ifdef SK_DEBUG |