Index: src/core/SkReadBuffer.cpp |
diff --git a/src/core/SkReadBuffer.cpp b/src/core/SkReadBuffer.cpp |
index 43587862b94f8e64f814c36704274ab31411ec62..ca65f606d0f3d9a16b8a6ec55ce407777519eb23 100644 |
--- a/src/core/SkReadBuffer.cpp |
+++ b/src/core/SkReadBuffer.cpp |
@@ -260,6 +260,11 @@ bool SkReadBuffer::readBitmap(SkBitmap* bitmap) { |
// not having a decoder. |
SkErrorInternals::SetError(kParseError_SkError, |
"Could not decode bitmap. Resulting bitmap will be red."); |
scroggo
2014/11/12 18:24:48
I think this error message is well out of date.
reed1
2014/11/12 19:25:19
Yea, esp. the RED part. I will update.
|
+ // Even though we weren't able to decode the pixels, the readbuffer should still be |
+ // intact, so we return true with an empty bitmap, so we don't for an abort of the |
scroggo
2014/11/12 18:24:48
force* ?
reed1
2014/11/12 19:25:19
Acknowledged.
|
+ // larger deserialize. |
+ bitmap->setInfo(SkImageInfo::MakeUnknown(width, height)); |
+ return true; |
} else { |
// A size of zero means the SkBitmap was simply flattened. |
if (this->isVersionLT(kNoMoreBitmapFlatten_Version)) { |