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

Unified Diff: gm/image.cpp

Issue 137993012: use some helper Make functions to initialize SkImageInfo (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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 | gm/srcmode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/image.cpp
diff --git a/gm/image.cpp b/gm/image.cpp
index 93e16b718c4e73ff34fedb41659319223c911130..f5f5228c61073ec1c17e824d3ba9eef948e94c3e 100644
--- a/gm/image.cpp
+++ b/gm/image.cpp
@@ -178,9 +178,7 @@ protected:
// since we draw into this directly, we need to start fresh
sk_bzero(fBuffer, fBufferSize);
- SkImageInfo info = {
- W, H, kPMColor_SkColorType, kPremul_SkAlphaType
- };
+ SkImageInfo info = SkImageInfo::MakeN32Premul(W, H);
SkAutoTUnref<SkSurface> surf0(SkSurface::NewRasterDirect(info, fBuffer, RB));
SkAutoTUnref<SkSurface> surf1(SkSurface::NewRaster(info));
SkAutoTUnref<SkSurface> surf2(SkSurface::NewPicture(info.fWidth, info.fHeight));
« no previous file with comments | « no previous file | gm/srcmode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698