Index: src/effects/gradients/SkGradientShader.cpp |
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp |
index 1da259afe1875dfa455ab1a0ca92814d3da601e1..5b0b9c763da184ec9b732112cbb2d76ed02ece26 100644 |
--- a/src/effects/gradients/SkGradientShader.cpp |
+++ b/src/effects/gradients/SkGradientShader.cpp |
@@ -583,7 +583,7 @@ void SkGradientShaderBase::getGradientTableBitmap(SkBitmap* bitmap) const { |
if (fMapper) { |
// force our cahce32pixelref to be built |
(void)this->getCache32(); |
- bitmap->setConfig(SkBitmap::kARGB_8888_Config, kCache32Count, 1); |
+ bitmap->setConfig(SkImageInfo::MakeN32Premul(kCache32Count, 1)); |
bitmap->setPixelRef(fCache32PixelRef); |
return; |
} |
@@ -624,7 +624,7 @@ void SkGradientShaderBase::getGradientTableBitmap(SkBitmap* bitmap) const { |
if (!gCache->find(storage.get(), size, bitmap)) { |
// force our cahce32pixelref to be built |
(void)this->getCache32(); |
- bitmap->setConfig(SkBitmap::kARGB_8888_Config, kCache32Count, 1); |
+ bitmap->setConfig(SkImageInfo::MakeN32Premul(kCache32Count, 1)); |
bitmap->setPixelRef(fCache32PixelRef); |
gCache->add(storage.get(), size, *bitmap); |
@@ -1043,7 +1043,7 @@ GrGradientEffect::GrGradientEffect(GrContext* ctx, |
desc.fHeight = 32; |
desc.fRowHeight = bitmap.height(); |
desc.fContext = ctx; |
- desc.fConfig = SkBitmapConfig2GrPixelConfig(bitmap.config()); |
+ desc.fConfig = SkImageInfo2GrPixelConfig(bitmap.colorType(), bitmap.alphaType()); |
fAtlas = GrTextureStripAtlas::GetAtlas(desc); |
SkASSERT(NULL != fAtlas); |