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

Unified Diff: samplecode/SampleFatBits.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 | « include/core/SkSurface.h ('k') | src/image/SkImagePriv.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 04fa1a39cbb7459873962cb5fc36ccf9371e3006..8159cc5db80d014b3baab632f469a520d69a8db0 100644
--- a/samplecode/SampleFatBits.cpp
+++ b/samplecode/SampleFatBits.cpp
@@ -91,13 +91,10 @@ public:
fInverse.setScale(SK_Scalar1 / zoom, SK_Scalar1 / zoom);
fShader->setLocalMatrix(fMatrix);
- SkImage::Info info = {
- width, height, SkImage::kPMColor_ColorType, SkImage::kPremul_AlphaType
- };
- fMinSurface.reset(SkSurface::NewRaster(info));
- info.fWidth *= zoom;
- info.fHeight *= zoom;
- fMaxSurface.reset(SkSurface::NewRaster(info));
+ fMinSurface.reset(SkSurface::NewRasterPMColor(width, height));
+ width *= zoom;
+ height *= zoom;
+ fMaxSurface.reset(SkSurface::NewRasterPMColor(width, height));
}
void drawBG(SkCanvas*);
« no previous file with comments | « include/core/SkSurface.h ('k') | src/image/SkImagePriv.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698