Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: src/gpu/GrAADistanceFieldPathRenderer.cpp

Issue 665913002: Move code to dump GrSurface as a png to helper files (Closed) Base URL: https://skia.googlesource.com/skia.git@separate-image-encoder-01-skimage
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
scroggo 2014/10/20 15:27:38 This is a good change that can go in separately.
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();
« no previous file with comments | « include/gpu/GrSurface.h ('k') | src/gpu/GrLayerCache.cpp » ('j') | src/gpu/GrSurfacePriv.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698