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

Unified Diff: include/gpu/GrSurface.h

Issue 25021006: Add GrSurface::savePixels(). (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Remove unnecessary #include Created 7 years, 3 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 | « no previous file | src/gpu/GrSurface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrSurface.h
diff --git a/include/gpu/GrSurface.h b/include/gpu/GrSurface.h
index 3aa498b6110bb00c4a0b130aedc031678ec58705..c401a905ff2177ca2ffd523c28f78639d8cc2ef7 100644
--- a/include/gpu/GrSurface.h
+++ b/include/gpu/GrSurface.h
@@ -126,6 +126,12 @@ public:
size_t rowBytes = 0,
uint32_t pixelOpsFlags = 0) = 0;
+ /**
+ * Write the contents of the surface to a PNG. Returns true if successful.
+ * @param filename Full path to desired file
+ */
+ bool savePixels(const char* filename);
+
protected:
GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc)
: INHERITED(gpu, isWrapped)
« no previous file with comments | « no previous file | src/gpu/GrSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698