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

Unified Diff: src/core/SkPicturePlayback.cpp

Issue 2379383002: Propagate validation errors (Closed)
Patch Set: fix spilling 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..53ef5e235509be72acd6a54189b63ae823a7ad30 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
robertphillips 2016/09/30 15:59:16 buffer->validate(reader->isValid()); ?
reed1 2016/09/30 16:04:13 Done.
+ if (!reader->isValid()) {
+ buffer->validate(false);
+ }
}
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