Index: samplecode/SampleShaderText.cpp |
diff --git a/samplecode/SampleShaderText.cpp b/samplecode/SampleShaderText.cpp |
index 6855824d3fb669946c032b68b2e025979e8ff659..c7048ab401c37c5a928c8206ffc9ab5e08167303 100644 |
--- a/samplecode/SampleShaderText.cpp |
+++ b/samplecode/SampleShaderText.cpp |
@@ -11,9 +11,8 @@ |
#include "SkGradientShader.h" |
#include "SkUnitMappers.h" |
-static void makebm(SkBitmap* bm, SkBitmap::Config config, int w, int h) { |
- bm->setConfig(config, w, h); |
- bm->allocPixels(); |
+static void makebm(SkBitmap* bm, int w, int h) { |
+ bm->allocN32Pixels(w, h); |
bm->eraseColor(SK_ColorTRANSPARENT); |
SkCanvas canvas(*bm); |
@@ -39,7 +38,7 @@ static SkShader* MakeBitmapShader(SkShader::TileMode tx, SkShader::TileMode ty, |
int w, int h) { |
static SkBitmap bmp; |
if (bmp.isNull()) { |
- makebm(&bmp, SkBitmap::kARGB_8888_Config, w/2, h/4); |
+ makebm(&bmp, w/2, h/4); |
} |
return SkShader::CreateBitmapShader(bmp, tx, ty); |
} |