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

Unified Diff: gm/image.cpp

Issue 24130009: promote SkImage::AlphaType to SkAlphaType (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 | « gm/fatpathfill.cpp ('k') | 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 6dada0d9492c14c93fe4e275c810d363d9e0cf39..e9378be0e20a7edae475900b7c559316a5b04a71 100644
--- a/gm/image.cpp
+++ b/gm/image.cpp
@@ -178,12 +178,9 @@ protected:
// since we draw into this directly, we need to start fresh
sk_bzero(fBuffer, fBufferSize);
- SkImage::Info info;
-
- info.fWidth = W;
- info.fHeight = H;
- info.fColorType = SkImage::kPMColor_ColorType;
- info.fAlphaType = SkImage::kPremul_AlphaType;
+ SkImage::Info info = {
+ W, H, SkImage::kPMColor_ColorType, kPremul_SkAlphaType
+ };
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 | « gm/fatpathfill.cpp ('k') | gm/srcmode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698