diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-17 20:03:43 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-17 20:03:43 +0000 |
commit | 636d87a3f411507020a21c6b0641da795eb5d275 (patch) | |
tree | 606dc7b3573a04810d4d785047b19d82b38f1d3a /include/core | |
parent | dcd36f3c9db6ff415834276d5f4b5fa1ced8ba25 (diff) |
update devicelooper to skip internal tiles that are empty, and unittests
BUG=
Review URL: https://codereview.chromium.org/23463040
git-svn-id: http://skia.googlecode.com/svn/trunk@11331 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkSurface.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h index a713277358..663cea0875 100644 --- a/include/core/SkSurface.h +++ b/include/core/SkSurface.h @@ -47,6 +47,18 @@ public: static SkSurface* NewRaster(const SkImage::Info&); /** + * Helper version of NewRaster. It creates a SkImage::Info with the + * specified width and height, and populates the rest of info to match + * pixels in SkPMColor format. + */ + static SkSurface* NewRasterPMColor(int width, int height) { + SkImage::Info info = { + width, height, SkImage::kPMColor_ColorType, SkImage::kPremul_AlphaType + }; + return NewRaster(info); + } + + /** * Return a new surface whose contents will be recorded into a picture. * When this surface is drawn into another canvas, its contents will be * "replayed" into that canvas. |