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

Unified Diff: include/core/SkSurface.h

Issue 169363007: Use factories instead of directly creating SkImageInfo. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 10 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 | « no previous file | tests/DeferredCanvasTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkSurface.h
===================================================================
--- include/core/SkSurface.h (revision 13479)
+++ include/core/SkSurface.h (working copy)
@@ -52,10 +52,7 @@
* pixels in SkPMColor format.
*/
static SkSurface* NewRasterPMColor(int width, int height) {
- SkImageInfo info = {
- width, height, kPMColor_SkColorType, kPremul_SkAlphaType
- };
- return NewRaster(info);
+ return NewRaster(SkImageInfo::MakeN32Premul(width, height));
}
/**
« no previous file with comments | « no previous file | tests/DeferredCanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698