Index: src/image/SkImage_Raster.cpp |
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp |
index abf6dc8af08a761914aa59a29bed9cb0a7705fa0..7a8091c8af4cecb2618ab39330df61afd8689a86 100644 |
--- a/src/image/SkImage_Raster.cpp |
+++ b/src/image/SkImage_Raster.cpp |
@@ -133,8 +133,8 @@ bool SkImage_Raster::onReadPixels(SkBitmap* dst, const SkIRect& subset) const { |
const void* SkImage_Raster::onPeekPixels(SkImageInfo* infoPtr, |
size_t* rowBytesPtr) const { |
- SkImageInfo info; |
- if (!fBitmap.asImageInfo(&info) || !fBitmap.getPixels()) { |
+ const SkImageInfo info = fBitmap.info(); |
+ if ((kUnknown_SkColorType == info.colorType()) || !fBitmap.getPixels()) { |
return NULL; |
} |
*infoPtr = info; |