diff options
author | 2012-07-31 15:45:27 +0000 | |
---|---|---|
committer | 2012-07-31 15:45:27 +0000 | |
commit | 5d4ba8869476831ee73b15a052af8003d0a1fa2e (patch) | |
tree | 00412261a2737750b426301eed006187255b9441 /include/core/SkSurface.h | |
parent | 0982d35187da7e1ed6c0eba5951bbdadca8b33e7 (diff) |
check-point for gpu support in SkImage/SkSurface
git-svn-id: http://skia.googlecode.com/svn/trunk@4859 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkSurface.h')
-rw-r--r-- | include/core/SkSurface.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h index 69889e5adc..0c20d4a229 100644 --- a/include/core/SkSurface.h +++ b/include/core/SkSurface.h @@ -13,6 +13,8 @@ class SkCanvas; class SkPaint; +class GrContext; +class GrRenderTarget; /** * SkSurface represents the backend/results of drawing to a canvas. For raster @@ -50,6 +52,18 @@ public: */ static SkSurface* NewPicture(int width, int height); + /** + * Return a new surface using the specified render target. + */ + static SkSurface* NewRenderTargetDirect(GrContext*, GrRenderTarget*); + + /** + * Return a new surface whose contents will be drawn to an offscreen + * render target, allocated by the surface. + */ + static SkSurface* NewRenderTarget(GrContext*, const SkImage::Info&, + SkColorSpace*, int sampleCount = 0); + int width() const { return fWidth; } int height() const { return fHeight; } |