diff options
author | Mike Reed <reed@google.com> | 2018-02-01 15:52:58 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-01 21:17:49 +0000 |
commit | 18ff51c46d2b4cb9277f26293e718e303079d7e8 (patch) | |
tree | 9dde87e70ccb6aaa7e575aec753cb666c2b75eca /src | |
parent | d0d7270fcc32546005b8e847df516cb11592cd30 (diff) |
signal on bad picture op, simplify other ops
Bug: skia:7569
Change-Id: Iec5d7472e6cdb0fe87a634209c5349085c9ebfbd
Reviewed-on: https://skia-review.googlesource.com/102424
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkPicturePlayback.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp index 69542bbd4a..f0d454a5ff 100644 --- a/src/core/SkPicturePlayback.cpp +++ b/src/core/SkPicturePlayback.cpp @@ -684,8 +684,6 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader, break; case ROTATE: { auto deg = reader->readScalar(); - BREAK_ON_READ_ERROR(reader); - canvas->rotate(deg); } break; case SAVE: @@ -734,34 +732,27 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader, case SCALE: { SkScalar sx = reader->readScalar(); SkScalar sy = reader->readScalar(); - BREAK_ON_READ_ERROR(reader); - canvas->scale(sx, sy); } break; case SET_MATRIX: { SkMatrix matrix; reader->readMatrix(&matrix); - BREAK_ON_READ_ERROR(reader); - matrix.postConcat(initialMatrix); canvas->setMatrix(matrix); } break; case SKEW: { SkScalar sx = reader->readScalar(); SkScalar sy = reader->readScalar(); - BREAK_ON_READ_ERROR(reader); - canvas->skew(sx, sy); } break; case TRANSLATE: { SkScalar dx = reader->readScalar(); SkScalar dy = reader->readScalar(); - BREAK_ON_READ_ERROR(reader); - canvas->translate(dx, dy); } break; default: - SkASSERTF(false, "Unknown draw type: %d", op); + reader->validate(false); // unknown op + break; } #undef BREAK_ON_READ_ERROR |