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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 2379383002: Propagate validation errors (Closed)
Patch Set: check for null buffer Created 4 years, 3 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/SkPicturePlayback.h ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicturePlayback.cpp
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index 2ffb6c20d1b993ce8830462f54623c94b93050f5..1aa4712d4f5699cf1307e1ece2fd18b54e25e56e 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -82,7 +82,7 @@ void get_text(SkReadBuffer* reader, TextContainer* text) {
void SkPicturePlayback::draw(SkCanvas* canvas,
SkPicture::AbortCallback* callback,
- const SkReadBuffer* buffer) {
+ SkReadBuffer* buffer) {
AutoResetOpID aroi(this);
SkASSERT(0 == fCurOffset);
@@ -114,6 +114,11 @@ void SkPicturePlayback::draw(SkCanvas* canvas,
this->handleOp(reader, op, size, canvas, initialMatrix);
}
+
+ // need to propagate invalid state to the parent reader
+ if (buffer) {
+ buffer->validate(reader->isValid());
+ }
}
void SkPicturePlayback::handleOp(SkReadBuffer* reader,
« no previous file with comments | « src/core/SkPicturePlayback.h ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698