Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: include/core/SkSurface.h

Issue 23463040: update devicelooper to skip internal tiles that are empty, and unittests (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/tests.gyp ('k') | samplecode/SamplePictFile.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkSurface.h
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h
index a71327735801507e86f7746ab9b89c1a1b060314..663cea08755758d4a9dd2f8e7d5100749084b7b7 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.
« no previous file with comments | « gyp/tests.gyp ('k') | samplecode/SamplePictFile.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698