Index: include/core/SkSurface.h |
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h |
index 8e430d8f47d2d0cfa6e626678d1b29b55cfa8a5b..a0ce2e0ad376d7a83f8a07884a1bb4c206e654c4 100644 |
--- a/include/core/SkSurface.h |
+++ b/include/core/SkSurface.h |
@@ -73,6 +73,18 @@ public: |
*/ |
static SkSurface* NewRenderTarget(GrContext*, const SkImageInfo&, int sampleCount = 0); |
+ /** |
+ * Return a new surface whose contents will be drawn to an offscreen |
+ * render target, allocated by the surface from the scratch texture pool |
+ * managed by the GrContext. The scratch texture pool serves the purpose |
bsalomon
2014/03/19 20:10:43
I'd add something about it counting against the Gr
|
+ * of retaining textures after they are no longer in use in order to |
+ * re-use them later without having to re-allocate. Scratch textures |
+ * should be used in cases where high turnover is expected. This allows, |
+ * for example, the copy on write to recycle a texture from a recently |
+ * released SkImage snapshot of the surface. |
+ */ |
+ static SkSurface* NewScratchRenderTarget(GrContext*, const SkImageInfo&, int sampleCount = 0); |
+ |
int width() const { return fWidth; } |
int height() const { return fHeight; } |