can we remove these entirely?
Change-Id: I3dbf9c25e6e0025cc1686789a089420ebce72bbd Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280191 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
parent
7a3358c80b
commit
0f5e7581a0
@ -2513,17 +2513,8 @@ protected:
|
||||
virtual void onDrawPoints(PointMode mode, size_t count, const SkPoint pts[],
|
||||
const SkPaint& paint);
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
virtual void onDrawVerticesObject(const SkVertices* vertices, SkBlendMode mode,
|
||||
const SkPaint& paint) {
|
||||
this->onDrawVerticesObject(vertices, nullptr, 0, mode, paint);
|
||||
}
|
||||
virtual void onDrawVerticesObject(const SkVertices* vertices, const SkVertices::Bone bones[],
|
||||
int boneCount, SkBlendMode mode, const SkPaint& paint);
|
||||
#else
|
||||
virtual void onDrawVerticesObject(const SkVertices* vertices, SkBlendMode mode,
|
||||
const SkPaint& paint);
|
||||
#endif
|
||||
virtual void onDrawImage(const SkImage* image, SkScalar dx, SkScalar dy, const SkPaint* paint);
|
||||
virtual void onDrawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst,
|
||||
const SkPaint* paint, SrcRectConstraint constraint);
|
||||
@ -2532,16 +2523,6 @@ protected:
|
||||
virtual void onDrawImageLattice(const SkImage* image, const Lattice& lattice, const SkRect& dst,
|
||||
const SkPaint* paint);
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_ONDRAWBITMAP_VIRTUALS
|
||||
// these are no longer called, so clients should stop overriding them
|
||||
virtual void onDrawBitmap(const SkBitmap&, SkScalar, SkScalar, const SkPaint*) {}
|
||||
virtual void onDrawBitmapRect(const SkBitmap&, const SkRect*, const SkRect&, const SkPaint*,
|
||||
SkCanvas::SrcRectConstraint) {}
|
||||
virtual void onDrawBitmapNine(const SkBitmap&, const SkIRect&, const SkRect&, const SkPaint*) {}
|
||||
virtual void onDrawBitmapLattice(const SkBitmap&, const SkCanvas::Lattice&, const SkRect&,
|
||||
const SkPaint*) {}
|
||||
#endif
|
||||
|
||||
virtual void onDrawAtlas(const SkImage* atlas, const SkRSXform xform[], const SkRect rect[],
|
||||
const SkColor colors[], int count, SkBlendMode mode,
|
||||
const SkRect* cull, const SkPaint* paint);
|
||||
|
@ -33,12 +33,7 @@ public:
|
||||
void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override;
|
||||
void onDrawRRect(const SkRRect&, const SkPaint&) override;
|
||||
void onDrawPoints(PointMode, size_t, const SkPoint[], const SkPaint&) override;
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
|
||||
SkBlendMode, const SkPaint&) override;
|
||||
#else
|
||||
void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
|
||||
#endif
|
||||
void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[],
|
||||
int, SkBlendMode, const SkRect*, const SkPaint*) override;
|
||||
void onDrawPath(const SkPath&, const SkPaint&) override;
|
||||
|
@ -48,12 +48,7 @@ protected:
|
||||
void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override;
|
||||
void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst,
|
||||
const SkPaint*, SrcRectConstraint) override;
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
|
||||
SkBlendMode, const SkPaint&) override;
|
||||
#else
|
||||
void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
|
||||
#endif
|
||||
void onClipRect(const SkRect&, SkClipOp, ClipEdgeStyle) override;
|
||||
void onClipRRect(const SkRRect&, SkClipOp, ClipEdgeStyle) override;
|
||||
void onClipPath(const SkPath&, SkClipOp, ClipEdgeStyle) override;
|
||||
|
@ -58,12 +58,7 @@ protected:
|
||||
void onDrawImageLattice(const SkImage*, const Lattice&, const SkRect&, const SkPaint*) override;
|
||||
void onDrawImageNine(const SkImage*, const SkIRect& center, const SkRect& dst,
|
||||
const SkPaint*) override;
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
|
||||
SkBlendMode, const SkPaint&) override;
|
||||
#else
|
||||
void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
|
||||
#endif
|
||||
void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[],
|
||||
int, SkBlendMode, const SkRect*, const SkPaint*) override;
|
||||
void onDrawShadowRec(const SkPath&, const SkDrawShadowRec&) override;
|
||||
|
@ -60,12 +60,7 @@ protected:
|
||||
void onDrawImageNine(const SkImage*, const SkIRect&, const SkRect&, const SkPaint*) override {}
|
||||
void onDrawImageLattice(const SkImage*, const Lattice&, const SkRect&,
|
||||
const SkPaint*) override {}
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
|
||||
SkBlendMode, const SkPaint&) override {}
|
||||
#else
|
||||
void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override {}
|
||||
#endif
|
||||
void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[],
|
||||
int, SkBlendMode, const SkRect*, const SkPaint*) override {}
|
||||
void onDrawShadowRec(const SkPath&, const SkDrawShadowRec&) override {}
|
||||
|
@ -67,12 +67,7 @@ protected:
|
||||
const SkPaint*) override;
|
||||
void onDrawImageLattice(const SkImage*, const Lattice&, const SkRect&,
|
||||
const SkPaint*) override;
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
|
||||
SkBlendMode, const SkPaint&) override;
|
||||
#else
|
||||
void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
|
||||
#endif
|
||||
void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
|
||||
const SkPoint texCoords[4], SkBlendMode,
|
||||
const SkPaint& paint) override;
|
||||
|
@ -2649,19 +2649,6 @@ void SkCanvas::drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
|
||||
this->onDrawTextBlob(blob, x, y, paint);
|
||||
}
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
void SkCanvas::onDrawVerticesObject(const SkVertices* vertices, const SkVertices::Bone bones[],
|
||||
int boneCount, SkBlendMode bmode, const SkPaint& paint) {
|
||||
DRAW_BEGIN(paint, nullptr)
|
||||
|
||||
while (iter.next()) {
|
||||
// In the common case of one iteration we could std::move vertices here.
|
||||
iter.fDevice->drawVertices(vertices, bmode, draw.paint());
|
||||
}
|
||||
|
||||
DRAW_END
|
||||
}
|
||||
#else
|
||||
void SkCanvas::onDrawVerticesObject(const SkVertices* vertices, SkBlendMode bmode,
|
||||
const SkPaint& paint) {
|
||||
DRAW_BEGIN(paint, nullptr)
|
||||
@ -2673,7 +2660,6 @@ void SkCanvas::onDrawVerticesObject(const SkVertices* vertices, SkBlendMode bmod
|
||||
|
||||
DRAW_END
|
||||
}
|
||||
#endif
|
||||
|
||||
void SkCanvas::drawPatch(const SkPoint cubics[12], const SkColor colors[4],
|
||||
const SkPoint texCoords[4], SkBlendMode bmode,
|
||||
|
@ -131,24 +131,10 @@ void SkOverdrawCanvas::onDrawPoints(PointMode mode, size_t count, const SkPoint
|
||||
fList[0]->onDrawPoints(mode, count, points, this->overdrawPaint(paint));
|
||||
}
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
void SkOverdrawCanvas::onDrawVerticesObject(const SkVertices* vertices,
|
||||
const SkVertices::Bone bones[], int boneCount,
|
||||
SkBlendMode blendMode, const SkPaint& paint) {
|
||||
fList[0]->onDrawVerticesObject(vertices,
|
||||
bones,
|
||||
boneCount,
|
||||
blendMode,
|
||||
this->overdrawPaint(paint));
|
||||
}
|
||||
#else
|
||||
void SkOverdrawCanvas::onDrawVerticesObject(const SkVertices* vertices,
|
||||
SkBlendMode blendMode, const SkPaint& paint) {
|
||||
fList[0]->onDrawVerticesObject(vertices,
|
||||
blendMode,
|
||||
this->overdrawPaint(paint));
|
||||
fList[0]->onDrawVerticesObject(vertices, blendMode, this->overdrawPaint(paint));
|
||||
}
|
||||
#endif
|
||||
|
||||
void SkOverdrawCanvas::onDrawAtlas(const SkImage* image, const SkRSXform xform[],
|
||||
const SkRect texs[], const SkColor colors[], int count,
|
||||
|
@ -662,9 +662,6 @@ void SkPictureRecord::onDrawDrawable(SkDrawable* drawable, const SkMatrix* matri
|
||||
}
|
||||
|
||||
void SkPictureRecord::onDrawVerticesObject(const SkVertices* vertices,
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
const SkVertices::Bone bones[], int boneCount,
|
||||
#endif
|
||||
SkBlendMode mode, const SkPaint& paint) {
|
||||
// op + paint index + vertices index + zero_bones + mode
|
||||
size_t size = 5 * kUInt32Size;
|
||||
|
@ -196,12 +196,7 @@ protected:
|
||||
const SkPaint*) override;
|
||||
|
||||
void onDrawShadowRec(const SkPath&, const SkDrawShadowRec&) override;
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
|
||||
SkBlendMode, const SkPaint&) override;
|
||||
#else
|
||||
void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
|
||||
#endif
|
||||
|
||||
void onClipRect(const SkRect&, SkClipOp, ClipEdgeStyle) override;
|
||||
void onClipRRect(const SkRRect&, SkClipOp, ClipEdgeStyle) override;
|
||||
|
@ -244,21 +244,12 @@ void SkRecorder::onDrawPicture(const SkPicture* pic, const SkMatrix* matrix, con
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
void SkRecorder::onDrawVerticesObject(const SkVertices* vertices, const SkVertices::Bone bones[],
|
||||
int boneCount, SkBlendMode bmode, const SkPaint& paint) {
|
||||
this->append<SkRecords::DrawVertices>(paint,
|
||||
sk_ref_sp(const_cast<SkVertices*>(vertices)),
|
||||
bmode);
|
||||
}
|
||||
#else
|
||||
void SkRecorder::onDrawVerticesObject(const SkVertices* vertices, SkBlendMode bmode,
|
||||
const SkPaint& paint) {
|
||||
this->append<SkRecords::DrawVertices>(paint,
|
||||
sk_ref_sp(const_cast<SkVertices*>(vertices)),
|
||||
bmode);
|
||||
}
|
||||
#endif
|
||||
|
||||
void SkRecorder::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
|
||||
const SkPoint texCoords[4], SkBlendMode bmode,
|
||||
|
@ -99,12 +99,7 @@ public:
|
||||
const SkPaint*) override;
|
||||
void onDrawImageLattice(const SkImage*, const Lattice& lattice, const SkRect& dst,
|
||||
const SkPaint*) override;
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
|
||||
SkBlendMode, const SkPaint&) override;
|
||||
#else
|
||||
void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
|
||||
#endif
|
||||
void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[],
|
||||
int count, SkBlendMode, const SkRect* cull, const SkPaint*) override;
|
||||
void onDrawShadowRec(const SkPath&, const SkDrawShadowRec&) override;
|
||||
|
@ -271,15 +271,7 @@ void SkLuaCanvas::onDrawDrawable(SkDrawable* drawable, const SkMatrix* matrix) {
|
||||
this->INHERITED::onDrawDrawable(drawable, matrix);
|
||||
}
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
void SkLuaCanvas::onDrawVerticesObject(const SkVertices*, const SkVertices::Bone[], int,
|
||||
SkBlendMode, const SkPaint& paint) {
|
||||
AUTO_LUA("drawVertices");
|
||||
lua.pushPaint(paint, "paint");
|
||||
}
|
||||
#else
|
||||
void SkLuaCanvas::onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint& paint) {
|
||||
AUTO_LUA("drawVertices");
|
||||
lua.pushPaint(paint, "paint");
|
||||
}
|
||||
#endif
|
||||
|
@ -296,9 +296,6 @@ void SkNWayCanvas::onDrawDrawable(SkDrawable* drawable, const SkMatrix* matrix)
|
||||
}
|
||||
|
||||
void SkNWayCanvas::onDrawVerticesObject(const SkVertices* vertices,
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
const SkVertices::Bone bones[], int boneCount,
|
||||
#endif
|
||||
SkBlendMode bmode, const SkPaint& paint) {
|
||||
Iter iter(fList);
|
||||
while (iter.next()) {
|
||||
|
@ -149,17 +149,10 @@ void SkPaintFilterCanvas::onDrawImageLattice(const SkImage* image, const Lattice
|
||||
}
|
||||
|
||||
void SkPaintFilterCanvas::onDrawVerticesObject(const SkVertices* vertices,
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
const SkVertices::Bone bones[], int boneCount,
|
||||
#endif
|
||||
SkBlendMode bmode, const SkPaint& paint) {
|
||||
AutoPaintFilter apf(this, paint);
|
||||
if (apf.shouldDraw()) {
|
||||
this->SkNWayCanvas::onDrawVerticesObject(vertices,
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
bones, boneCount,
|
||||
#endif
|
||||
bmode, apf.paint());
|
||||
this->SkNWayCanvas::onDrawVerticesObject(vertices, bmode, apf.paint());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -490,24 +490,12 @@ void DebugCanvas::onDrawPatch(const SkPoint cubics[12],
|
||||
this->addDrawCommand(new DrawPatchCommand(cubics, colors, texCoords, bmode, paint));
|
||||
}
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
void DebugCanvas::onDrawVerticesObject(const SkVertices* vertices,
|
||||
const SkVertices::Bone bones[],
|
||||
int boneCount,
|
||||
SkBlendMode bmode,
|
||||
const SkPaint& paint) {
|
||||
// TODO: ANIMATION NOT LOGGED
|
||||
this->addDrawCommand(
|
||||
new DrawVerticesCommand(sk_ref_sp(const_cast<SkVertices*>(vertices)), bmode, paint));
|
||||
}
|
||||
#else
|
||||
void DebugCanvas::onDrawVerticesObject(const SkVertices* vertices,
|
||||
SkBlendMode bmode,
|
||||
const SkPaint& paint) {
|
||||
this->addDrawCommand(
|
||||
new DrawVerticesCommand(sk_ref_sp(const_cast<SkVertices*>(vertices)), bmode, paint));
|
||||
}
|
||||
#endif
|
||||
|
||||
void DebugCanvas::onDrawAtlas(const SkImage* image,
|
||||
const SkRSXform xform[],
|
||||
|
@ -157,12 +157,7 @@ protected:
|
||||
void onDrawArc(const SkRect&, SkScalar, SkScalar, bool, const SkPaint&) override;
|
||||
void onDrawRRect(const SkRRect&, const SkPaint&) override;
|
||||
void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&) override;
|
||||
#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL
|
||||
void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone bones[], int boneCount,
|
||||
SkBlendMode, const SkPaint&) override;
|
||||
#else
|
||||
void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
|
||||
#endif
|
||||
void onDrawPath(const SkPath&, const SkPaint&) override;
|
||||
void onDrawRegion(const SkRegion&, const SkPaint&) override;
|
||||
void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint*) override;
|
||||
|
Loading…
Reference in New Issue
Block a user