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

Unified Diff: src/gpu/GrTextStrike.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: address review comments 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
« no previous file with comments | « src/gpu/GrSurfacePriv.h ('k') | src/ports/SkImagesSupport_default.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextStrike.cpp
diff --git a/src/gpu/GrTextStrike.cpp b/src/gpu/GrTextStrike.cpp
index 81be3418f7ca1d8c71596bdbfb0afb55f16b602e..edc2ff095a5da862e71051afef9de1f011e20f16 100644
--- a/src/gpu/GrTextStrike.cpp
+++ b/src/gpu/GrTextStrike.cpp
@@ -201,6 +201,7 @@ void GrFontCache::dump() const {
for (int i = 0; i < kAtlasCount; ++i) {
if (fAtlases[i]) {
GrTexture* texture = fAtlases[i]->getTexture();
+#if SK_DEVELOPER
if (texture) {
SkString filename;
#ifdef SK_BUILD_FOR_ANDROID
@@ -208,8 +209,9 @@ void GrFontCache::dump() const {
#else
filename.printf("fontcache_%d%d.png", gDumpCount, i);
#endif
- texture->surfacePriv().savePixels(filename.c_str());
+ SkSaveGrSurfacePixelsAsPNG(texture, filename.c_str());
}
+#endif
}
}
++gDumpCount;
« no previous file with comments | « src/gpu/GrSurfacePriv.h ('k') | src/ports/SkImagesSupport_default.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698