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

Unified Diff: samplecode/SampleFatBits.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 | « platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp ('k') | src/core/SkImageFilterUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleFatBits.cpp
diff --git a/samplecode/SampleFatBits.cpp b/samplecode/SampleFatBits.cpp
index c6fc67f3cc263ade06d8d9b42f55c0cf66832e93..8b486bd016ce857ba0564dfebad97446e2d5cfe8 100644
--- a/samplecode/SampleFatBits.cpp
+++ b/samplecode/SampleFatBits.cpp
@@ -106,9 +106,7 @@ public:
fInverse.setScale(SK_Scalar1 / zoom, SK_Scalar1 / zoom);
fShader->setLocalMatrix(fMatrix);
- SkImageInfo info = {
- width, height, kPMColor_SkColorType, kPremul_SkAlphaType
- };
+ SkImageInfo info = SkImageInfo::MakeN32Premul(width, height);
fMinSurface.reset(SkSurface::NewRaster(info));
info.fWidth *= zoom;
info.fHeight *= zoom;
« no previous file with comments | « platform_tools/android/examples/hello_skia_app/jni/helloskia.cpp ('k') | src/core/SkImageFilterUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698