Index: src/effects/gradients/SkGradientShader.cpp |
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp |
index 6925ad2e4b71bf94d4b0307812ef4778e833a49b..8ed40a7dda3570a34ef6bb742416cffec7a45bd2 100644 |
--- a/src/effects/gradients/SkGradientShader.cpp |
+++ b/src/effects/gradients/SkGradientShader.cpp |
@@ -583,8 +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->setPixelRef(fCache32PixelRef); |
+ bitmap->installPixelRef(fCache32PixelRef); |
return; |
} |
@@ -624,8 +623,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->setPixelRef(fCache32PixelRef); |
+ bitmap->installPixelRef(fCache32PixelRef); |
gCache->add(storage.get(), size, *bitmap); |
} |