Index: src/image/SkImagePriv.cpp |
diff --git a/src/image/SkImagePriv.cpp b/src/image/SkImagePriv.cpp |
index 538c6bb827c98ce849adf96f6f512f325a1fea8a..56afd6649cf2c0f520d6b4dea84cf5f914f2ba68 100644 |
--- a/src/image/SkImagePriv.cpp |
+++ b/src/image/SkImagePriv.cpp |
@@ -51,8 +51,8 @@ SkColorType SkBitmapConfigToColorType(SkBitmap::Config config) { |
} |
SkImage* SkNewImageFromBitmap(const SkBitmap& bm, bool canSharePixelRef) { |
- SkImageInfo info; |
- if (!bm.asImageInfo(&info)) { |
+ const SkImageInfo info = bm.info(); |
+ if (kUnknown_SkColorType == info.colorType()) { |
return NULL; |
} |