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) |