Index: src/utils/SkBitmapSourceDeserializer.cpp |
diff --git a/src/utils/SkBitmapSourceDeserializer.cpp b/src/utils/SkBitmapSourceDeserializer.cpp |
index bf4ec6021911d4ec15b3d3f00459bfd66279f50a..1f8cc1c7bd8cea31b7e740c8949f3c6fd77952f3 100644 |
--- a/src/utils/SkBitmapSourceDeserializer.cpp |
+++ b/src/utils/SkBitmapSourceDeserializer.cpp |
@@ -23,11 +23,9 @@ sk_sp<SkFlattenable> SkBitmapSourceDeserializer::CreateProc(SkReadBuffer& buffer |
SkRect src, dst; |
buffer.readRect(&src); |
buffer.readRect(&dst); |
- SkBitmap bitmap; |
- if (!buffer.readBitmap(&bitmap)) { |
- return nullptr; |
+ sk_sp<SkImage> image = buffer.readBitmapAsImage(); |
+ if (image) { |
+ return SkImageSource::Make(std::move(image), src, dst, filterQuality); |
} |
- bitmap.setImmutable(); |
- |
- return SkImageSource::Make(SkImage::MakeFromBitmap(bitmap), src, dst, filterQuality); |
+ return nullptr; |
} |