Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1690)

Unified Diff: src/core/SkValidatingReadBuffer.cpp

Issue 195223003: Fixing SkPicture serialization (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed nits Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkValidatingReadBuffer.h ('k') | src/ports/SkGlobalInitialization_chromium.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkValidatingReadBuffer.cpp
diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp
index ae7a83684bc818dcb267f9466cb4002804ed0f07..8db2c68b9aeeeae0e1492ab37cda59e77bd99c60 100644
--- a/src/core/SkValidatingReadBuffer.cpp
+++ b/src/core/SkValidatingReadBuffer.cpp
@@ -213,10 +213,10 @@ uint32_t SkValidatingReadBuffer::getArrayCount() {
void SkValidatingReadBuffer::readBitmap(SkBitmap* bitmap) {
const int width = this->readInt();
const int height = this->readInt();
+ const bool useBitmapHeap = this->readBool();
const size_t length = this->readUInt();
// A size of zero means the SkBitmap was simply flattened.
- this->validate(length == 0);
- if (fError) {
+ if (!this->validate(!useBitmapHeap && (0 == length))) {
return;
}
bitmap->unflatten(*this);
« no previous file with comments | « src/core/SkValidatingReadBuffer.h ('k') | src/ports/SkGlobalInitialization_chromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698