Index: src/image/SkImage.cpp |
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp |
index 795b8420e6e8cbdff7e3a8d635f79f1902ddc742..a6063846c7851711503d7c6a1d262c2ec62efbfb 100644 |
--- a/src/image/SkImage.cpp |
+++ b/src/image/SkImage.cpp |
@@ -117,9 +117,8 @@ bool SkImage_Base::onReadPixels(SkBitmap* bitmap, const SkIRect& subset) const { |
return false; |
} |
} else { |
- const SkImageInfo info = SkImageInfo::MakeN32Premul(subset.width(), subset.height()); |
SkBitmap tmp; |
- if (!tmp.allocPixels(info)) { |
+ if (!tmp.tryAllocN32Pixels(subset.width(), subset.height())) { |
return false; |
} |
*bitmap = tmp; |