| Index: src/gpu/GrAADistanceFieldPathRenderer.cpp
|
| diff --git a/src/gpu/GrAADistanceFieldPathRenderer.cpp b/src/gpu/GrAADistanceFieldPathRenderer.cpp
|
| index 95e4e7ac98d5a6f418220f959ce628c1841d6c17..ea763e5d334b14ea0554cb31a7261ad01680fccb 100755
|
| --- a/src/gpu/GrAADistanceFieldPathRenderer.cpp
|
| +++ b/src/gpu/GrAADistanceFieldPathRenderer.cpp
|
| @@ -28,8 +28,10 @@
|
| #define NUM_PLOTS_X (ATLAS_TEXTURE_WIDTH / PLOT_WIDTH)
|
| #define NUM_PLOTS_Y (ATLAS_TEXTURE_HEIGHT / PLOT_HEIGHT)
|
|
|
| +#ifdef SK_DEVELOPER
|
| SK_CONF_DECLARE(bool, c_DumpPathCache, "gpu.dumpPathCache", false,
|
| "Dump the contents of the path cache before every purge.");
|
| +#endif
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| GrAADistanceFieldPathRenderer::~GrAADistanceFieldPathRenderer() {
|
| @@ -186,13 +188,13 @@ GrAADistanceFieldPathRenderer::PathData* GrAADistanceFieldPathRenderer::addPathT
|
| goto HAS_ATLAS;
|
| }
|
| }
|
| -
|
| - if (c_DumpPathCache) {
|
| +
|
| #ifdef SK_DEVELOPER
|
| + if (c_DumpPathCache) {
|
| GrTexture* texture = fAtlas->getTexture();
|
| - texture->surfacePriv().savePixels("pathcache.png");
|
| -#endif
|
| + SkSaveGrSurfacePixelsAsPNG(texture, "pathcache.png");
|
| }
|
| +#endif
|
|
|
| // before we purge the cache, we must flush any accumulated draws
|
| fContext->flush();
|
|
|