diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkPictureData.h | 6 | ||||
-rw-r--r-- | src/core/SkPictureFlat.h | 13 | ||||
-rw-r--r-- | src/core/SkPicturePlayback.cpp | 54 |
3 files changed, 5 insertions, 68 deletions
diff --git a/src/core/SkPictureData.h b/src/core/SkPictureData.h index 26fdca912c..3d54a47a79 100644 --- a/src/core/SkPictureData.h +++ b/src/core/SkPictureData.h @@ -95,12 +95,6 @@ protected: bool parseBuffer(SkReadBuffer& buffer); public: - const SkImage* getBitmapAsImage(SkReadBuffer* reader) const { - // images are written base-0, unlike paths, pictures, drawables, etc. - const int index = reader->readInt(); - return reader->validateIndex(index, fBitmapImageCount) ? fBitmapImageRefs[index] : nullptr; - } - const SkImage* getImage(SkReadBuffer* reader) const { // images are written base-0, unlike paths, pictures, drawables, etc. const int index = reader->readInt(); diff --git a/src/core/SkPictureFlat.h b/src/core/SkPictureFlat.h index ed9d0684fd..e48272d982 100644 --- a/src/core/SkPictureFlat.h +++ b/src/core/SkPictureFlat.h @@ -30,10 +30,10 @@ enum DrawType { CLIP_RECT, CLIP_RRECT, CONCAT, - DRAW_BITMAP, - DRAW_BITMAP_MATRIX, // deprecated, M41 was last Chromium version to write this to an .skp - DRAW_BITMAP_NINE, - DRAW_BITMAP_RECT, + DRAW_BITMAP_RETIRED_2016_REMOVED_2018, + DRAW_BITMAP_MATRIX_RETIRED_2016_REMOVED_2018, + DRAW_BITMAP_NINE_RETIRED_2016_REMOVED_2018, + DRAW_BITMAP_RECT_RETIRED_2016_REMOVED_2018, DRAW_CLEAR, DRAW_DATA, DRAW_OVAL, @@ -47,7 +47,7 @@ enum DrawType { DRAW_POS_TEXT_H_TOP_BOTTOM, // fast variant of DRAW_POS_TEXT_H DRAW_RECT, DRAW_RRECT, - DRAW_SPRITE, + DRAW_SPRITE_RETIRED_2015_REMOVED_2018, DRAW_TEXT, DRAW_TEXT_ON_PATH, DRAW_TEXT_TOP_BOTTOM, // fast variant of DRAW_TEXT @@ -100,9 +100,6 @@ enum DrawType { LAST_DRAWTYPE_ENUM = FLUSH }; -// In the 'match' method, this constant will match any flavor of DRAW_BITMAP* -static const int kDRAW_BITMAP_FLAVOR = LAST_DRAWTYPE_ENUM+1; - enum DrawVertexFlags { DRAW_VERTICES_HAS_TEXS = 0x01, DRAW_VERTICES_HAS_COLORS = 0x02, diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp index 9964c748fa..f28843e0d6 100644 --- a/src/core/SkPicturePlayback.cpp +++ b/src/core/SkPicturePlayback.cpp @@ -270,53 +270,6 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader, canvas->drawAtlas(atlas, xform, tex, colors, count, mode, cull, paint); } break; - case DRAW_BITMAP: { - const SkPaint* paint = fPictureData->getPaint(reader); - const SkImage* image = fPictureData->getBitmapAsImage(reader); - SkPoint loc; - reader->readPoint(&loc); - BREAK_ON_READ_ERROR(reader); - - canvas->drawImage(image, loc.fX, loc.fY, paint); - } break; - case DRAW_BITMAP_RECT: { - const SkPaint* paint = fPictureData->getPaint(reader); - const SkImage* image = fPictureData->getBitmapAsImage(reader); - SkRect storage; - const SkRect* src = get_rect_ptr(reader, &storage); // may be null - SkRect dst; - reader->readRect(&dst); // required - SkCanvas::SrcRectConstraint constraint = (SkCanvas::SrcRectConstraint)reader->readInt(); - BREAK_ON_READ_ERROR(reader); - - if (src) { - canvas->drawImageRect(image, *src, dst, paint, constraint); - } else { - canvas->drawImageRect(image, dst, paint, constraint); - } - } break; - case DRAW_BITMAP_MATRIX: { - const SkPaint* paint = fPictureData->getPaint(reader); - const SkImage* image = fPictureData->getBitmapAsImage(reader); - SkMatrix matrix; - reader->readMatrix(&matrix); - BREAK_ON_READ_ERROR(reader); - - SkAutoCanvasRestore acr(canvas, true); - canvas->concat(matrix); - canvas->drawImage(image, 0, 0, paint); - } break; - case DRAW_BITMAP_NINE: { - const SkPaint* paint = fPictureData->getPaint(reader); - const SkImage* image = fPictureData->getBitmapAsImage(reader); - SkIRect src; - reader->readIRect(&src); - SkRect dst; - reader->readRect(&dst); - BREAK_ON_READ_ERROR(reader); - - canvas->drawImageNine(image, src, dst, paint); - } break; case DRAW_CLEAR: { auto c = reader->readInt(); BREAK_ON_READ_ERROR(reader); @@ -590,13 +543,6 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader, canvas->private_draw_shadow_rec(path, rec); } break; - case DRAW_SPRITE: { - /* const SkPaint* paint = */ fPictureData->getPaint(reader); - /* const SkImage* image = */ fPictureData->getBitmapAsImage(reader); - /* int left = */ reader->readInt(); - /* int top = */ reader->readInt(); - // drawSprite removed dec-2015 - } break; case DRAW_TEXT: { const SkPaint* paint = fPictureData->getPaint(reader); TextContainer text(reader, paint); |