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
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h
index a713277..663cea0 100644
--- a/include/core/SkSurface.h
+++ b/include/core/SkSurface.h
@@ -47,6 +47,18 @@
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.