Index: src/core/SkScaledImageCache.cpp |
diff --git a/src/core/SkScaledImageCache.cpp b/src/core/SkScaledImageCache.cpp |
index 6a1264eb6a3393ac165af18ba954f1657c2d7d31..f0f34ccbf17533d5f019907343b7d13fb124d03c 100644 |
--- a/src/core/SkScaledImageCache.cpp |
+++ b/src/core/SkScaledImageCache.cpp |
@@ -289,13 +289,12 @@ bool SkScaledImageCacheDiscardableAllocator::allocPixelRef(SkBitmap* bitmap, |
return false; |
} |
- // can relax when we have bitmap::asImageInfo |
- if (SkBitmap::kARGB_8888_Config != bitmap->config()) { |
+ // can we relax this? |
+ if (kPMColor_SkColorType != bitmap->colorType()) { |
return false; |
} |
- SkImageInfo info = SkImageInfo::MakeN32(bitmap->width(), bitmap->height(), |
- bitmap->alphaType()); |
+ SkImageInfo info = bitmap->info(); |
bitmap->setPixelRef(SkNEW_ARGS(SkOneShotDiscardablePixelRef, |
(info, dm, bitmap->rowBytes())))->unref(); |
bitmap->lockPixels(); |