Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: src/effects/gradients/SkGradientShader.cpp

Issue 132643007: Revert "Revert of https://codereview.chromium.org/129423002/" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkScaledImageCache.cpp ('k') | src/image/SkImagePriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/core/SkScaledImageCache.cpp ('k') | src/image/SkImagePriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698