Index: src/effects/gradients/SkGradientShader.cpp |
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp |
index 8ed40a7dda3570a34ef6bb742416cffec7a45bd2..6925ad2e4b71bf94d4b0307812ef4778e833a49b 100644 |
--- a/src/effects/gradients/SkGradientShader.cpp |
+++ b/src/effects/gradients/SkGradientShader.cpp |
@@ -583,7 +583,8 @@ |
if (fMapper) { |
// force our cahce32pixelref to be built |
(void)this->getCache32(); |
- bitmap->installPixelRef(fCache32PixelRef); |
+ bitmap->setConfig(SkBitmap::kARGB_8888_Config, kCache32Count, 1); |
+ bitmap->setPixelRef(fCache32PixelRef); |
return; |
} |
@@ -623,7 +624,8 @@ |
if (!gCache->find(storage.get(), size, bitmap)) { |
// force our cahce32pixelref to be built |
(void)this->getCache32(); |
- bitmap->installPixelRef(fCache32PixelRef); |
+ bitmap->setConfig(SkBitmap::kARGB_8888_Config, kCache32Count, 1); |
+ bitmap->setPixelRef(fCache32PixelRef); |
gCache->add(storage.get(), size, *bitmap); |
} |