Chromium Code Reviews| Index: src/gpu/GrTextStrike.cpp |
| diff --git a/src/gpu/GrTextStrike.cpp b/src/gpu/GrTextStrike.cpp |
| index e399c91f6c5b9bdfc5416f0585628eb073894870..c55d8ab4b5f3b2a85bc6d449fc9c436c6fcfdf1c 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,21 @@ void GrFontCache::validate() const { |
| } |
| #endif |
|
robertphillips
2013/10/02 15:07:28
SK_DEBUG? DEV?
|
| +void GrFontCache::dump() const { |
|
robertphillips
2013/10/02 15:07:28
I feel this needs some fancy naming: gDumpCount, s
|
| + static int dumpCount = 0; |
| + for (int i = 0; i < kMaskFormatCount; ++i) { |
|
robertphillips
2013/10/02 15:07:28
NULL !=
|
| + if (fAtlasMgr[i]) { |
| + GrTexture* texture = fAtlasMgr[i]->getTexture(); |
|
robertphillips
2013/10/02 15:07:28
NULL !=
|
| + if (texture) { |
| + SkString filename; |
|
robertphillips
2013/10/02 15:07:28
Would it be more helpful to convert the mask forma
|
| + filename.printf("fontcache_%d%d.png", dumpCount, i); |
| + texture->savePixels(filename.c_str()); |
| + } |
| + } |
| + } |
| + ++dumpCount; |
| +} |
| + |
| /////////////////////////////////////////////////////////////////////////////// |
| #ifdef SK_DEBUG |