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*); |