Index: src/core/SkScaledImageCache.cpp |
diff --git a/src/core/SkScaledImageCache.cpp b/src/core/SkScaledImageCache.cpp |
index 68663f03b0aac595777631dfb937f27ca5e2a719..fc3148bdd8807a31f0660c7f45b36e78bdcd1f41 100644 |
--- a/src/core/SkScaledImageCache.cpp |
+++ b/src/core/SkScaledImageCache.cpp |
@@ -293,10 +293,14 @@ |
return false; |
} |
- SkImageInfo info = SkImageInfo::MakeN32(bitmap->width(), bitmap->height(), |
- bitmap->alphaType()); |
- |
- bitmap->installPixelRef(SkNEW_ARGS(SkOneShotDiscardablePixelRef, |
+ SkImageInfo info = { |
+ bitmap->width(), |
+ bitmap->height(), |
+ kPMColor_SkColorType, |
+ bitmap->alphaType() |
+ }; |
+ |
+ bitmap->setPixelRef(SkNEW_ARGS(SkOneShotDiscardablePixelRef, |
(info, dm, bitmap->rowBytes())))->unref(); |
bitmap->lockPixels(); |
return bitmap->readyToDraw(); |