diff options
-rw-r--r-- | include/private/SkMiniRecorder.h | 6 | ||||
-rw-r--r-- | src/core/SkMiniRecorder.cpp | 16 | ||||
-rw-r--r-- | src/core/SkRecorder.cpp | 1 |
3 files changed, 1 insertions, 22 deletions
diff --git a/include/private/SkMiniRecorder.h b/include/private/SkMiniRecorder.h index 2f5612ca39..6365ebc65b 100644 --- a/include/private/SkMiniRecorder.h +++ b/include/private/SkMiniRecorder.h @@ -20,8 +20,6 @@ public: ~SkMiniRecorder(); // Try to record an op. Returns false on failure. - bool drawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, - const SkPaint*, SkCanvas::SrcRectConstraint); bool drawPath(const SkPath&, const SkPaint&); bool drawRect(const SkRect&, const SkPaint&); bool drawTextBlob(const SkTextBlob*, SkScalar x, SkScalar y, const SkPaint&); @@ -38,7 +36,6 @@ public: private: enum class State { kEmpty, - kDrawBitmapRectFixedSize, kDrawPath, kDrawRect, kDrawTextBlob, @@ -50,10 +47,9 @@ private: struct Max { static const size_t val = A > B ? A : B; }; static const size_t kInlineStorage = - Max<sizeof(SkRecords::DrawBitmapRectFixedSize), Max<sizeof(SkRecords::DrawPath), Max<sizeof(SkRecords::DrawRect), - sizeof(SkRecords::DrawTextBlob)>::val>::val>::val; + sizeof(SkRecords::DrawTextBlob)>::val>::val; SkAlignedSStorage<kInlineStorage> fBuffer; }; diff --git a/src/core/SkMiniRecorder.cpp b/src/core/SkMiniRecorder.cpp index ea1866e084..a5d676aed9 100644 --- a/src/core/SkMiniRecorder.cpp +++ b/src/core/SkMiniRecorder.cpp @@ -70,20 +70,6 @@ SkMiniRecorder::~SkMiniRecorder() { new (fBuffer.get()) Type{__VA_ARGS__}; \ return true -bool SkMiniRecorder::drawBitmapRect(const SkBitmap& bm, const SkRect* src, const SkRect& dst, - const SkPaint* p, SkCanvas::SrcRectConstraint constraint) { - SkRect bounds; - if (!src) { - bm.getBounds(&bounds); - src = &bounds; - } - SkTLazy<SkPaint> defaultPaint; - if (!p) { - p = defaultPaint.init(); - } - TRY_TO_STORE(DrawBitmapRectFixedSize, *p, bm, *src, dst, constraint); -} - bool SkMiniRecorder::drawRect(const SkRect& rect, const SkPaint& paint) { TRY_TO_STORE(DrawRect, paint, rect); } @@ -111,7 +97,6 @@ sk_sp<SkPicture> SkMiniRecorder::detachAsPicture(const SkRect& cull) { case State::kEmpty: once([]{ empty = new SkEmptyPicture; }); return sk_ref_sp(empty); - CASE(DrawBitmapRectFixedSize); CASE(DrawPath); CASE(DrawRect); CASE(DrawTextBlob); @@ -132,7 +117,6 @@ void SkMiniRecorder::flushAndReset(SkCanvas* canvas) { switch (fState) { case State::kEmpty: return; - CASE(DrawBitmapRectFixedSize); CASE(DrawPath); CASE(DrawRect); CASE(DrawTextBlob); diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp index 76fd3b819e..b620b37c36 100644 --- a/src/core/SkRecorder.cpp +++ b/src/core/SkRecorder.cpp @@ -202,7 +202,6 @@ void SkRecorder::onDrawBitmapRect(const SkBitmap& bitmap, this->onDrawImageRect(image, src, dst, paint); } #else - TRY_MINIRECORDER(drawBitmapRect, bitmap, src, dst, paint, constraint); if (kFast_SrcRectConstraint == constraint) { APPEND(DrawBitmapRectFast, this->copy(paint), bitmap, this->copy(src), dst); return; |