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

Unified Diff: include/gpu/GrSurface.h

Issue 25021006: Add GrSurface::savePixels(). (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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') | src/gpu/GrSurface.cpp » ('J')
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..7d8a9240d3b68729eebff412d5096022a0fad892 100644
--- a/include/gpu/GrSurface.h
+++ b/include/gpu/GrSurface.h
@@ -15,6 +15,7 @@
class GrTexture;
class GrRenderTarget;
+class GrDrawState;
class GrSurface : public GrResource {
public:
@@ -126,6 +127,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') | src/gpu/GrSurface.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698