use SkColorType instead of SkBitmap::Config in views/effects
R=scroggo@google.com, reed@google.com
TBR=scroggo
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/168843002
git-svn-id: http://skia.googlecode.com/svn/trunk@13469 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp
index 1da259a..5b0b9c7 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -583,7 +583,7 @@
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 @@
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 @@
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);