diff --git a/shell/common/canvas_spy.cc b/shell/common/canvas_spy.cc index d31a86f18d158..2cdb71f7eadaf 100644 --- a/shell/common/canvas_spy.cc +++ b/shell/common/canvas_spy.cc @@ -124,6 +124,7 @@ void DidDrawCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) { MarkDrawIfNonTransparentPaint(paint); } +#if defined(SK_SUPPORT_LEGACY_ONDRAWBITMAP_VIRTUALS) void DidDrawCanvas::onDrawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, @@ -138,6 +139,7 @@ void DidDrawCanvas::onDrawBitmapRect(const SkBitmap& bitmap, SrcRectConstraint constraint) { did_draw_ = true; } +#endif void DidDrawCanvas::onDrawImage(const SkImage* image, SkScalar left, diff --git a/shell/common/canvas_spy.h b/shell/common/canvas_spy.h index 0fc466bb05938..4aab238eecf48 100644 --- a/shell/common/canvas_spy.h +++ b/shell/common/canvas_spy.h @@ -127,6 +127,7 @@ class DidDrawCanvas final : public SkCanvasVirtualEnforcer { // |SkCanvasVirtualEnforcer| void onDrawPath(const SkPath&, const SkPaint&) override; +#if defined(SK_SUPPORT_LEGACY_ONDRAWBITMAP_VIRTUALS) // |SkCanvasVirtualEnforcer| void onDrawBitmap(const SkBitmap&, SkScalar left, @@ -139,6 +140,7 @@ class DidDrawCanvas final : public SkCanvasVirtualEnforcer { const SkRect& dst, const SkPaint*, SrcRectConstraint) override; +#endif // |SkCanvasVirtualEnforcer| void onDrawImage(const SkImage*, diff --git a/testing/mock_canvas.cc b/testing/mock_canvas.cc index c1c766b0b610f..88ab5f9ed196d 100644 --- a/testing/mock_canvas.cc +++ b/testing/mock_canvas.cc @@ -225,12 +225,14 @@ void MockCanvas::onDrawRRect(const SkRRect&, const SkPaint&) { FML_DCHECK(false); } +#if defined(SK_SUPPORT_LEGACY_ONDRAWBITMAP_VIRTUALS) void MockCanvas::onDrawBitmap(const SkBitmap&, SkScalar, SkScalar, const SkPaint*) { FML_DCHECK(false); } +#endif void MockCanvas::onDrawImage(const SkImage*, SkScalar, @@ -239,6 +241,7 @@ void MockCanvas::onDrawImage(const SkImage*, FML_DCHECK(false); } +#if defined(SK_SUPPORT_LEGACY_ONDRAWBITMAP_VIRTUALS) void MockCanvas::onDrawBitmapRect(const SkBitmap&, const SkRect*, const SkRect&, @@ -246,6 +249,7 @@ void MockCanvas::onDrawBitmapRect(const SkBitmap&, SrcRectConstraint) { FML_DCHECK(false); } +#endif void MockCanvas::onDrawImageRect(const SkImage*, const SkRect*, diff --git a/testing/mock_canvas.h b/testing/mock_canvas.h index 17ef16bfa660e..e7438db5fba86 100644 --- a/testing/mock_canvas.h +++ b/testing/mock_canvas.h @@ -195,11 +195,13 @@ class MockCanvas : public SkCanvasVirtualEnforcer { bool, const SkPaint&) override; void onDrawRRect(const SkRRect&, const SkPaint&) override; +#if defined(SK_SUPPORT_LEGACY_ONDRAWBITMAP_VIRTUALS) void onDrawBitmapRect(const SkBitmap&, const SkRect*, const SkRect&, const SkPaint*, SrcRectConstraint) override; +#endif void onDrawImage(const SkImage* image, SkScalar x, SkScalar y, @@ -213,10 +215,12 @@ class MockCanvas : public SkCanvasVirtualEnforcer { const SkIRect&, const SkRect&, const SkPaint*) override; +#if defined(SK_SUPPORT_LEGACY_ONDRAWBITMAP_VIRTUALS) void onDrawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, const SkPaint* paint) override; +#endif void onDrawImageLattice(const SkImage*, const Lattice&, const SkRect&,