aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-03-17 12:09:04 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-17 17:03:18 +0000
commitfed9cfdc0216152d7fffe6d838ea7281466ffe74 (patch)
treef492f753a9ec89df2e9725bd5e60b7101f6c9a9a /include
parente0a34e7dcddf68f0972805894f26c54869c3faba (diff)
remove legacy virtual for vertices, only support object form
BUG=skia:6366 Change-Id: Ic422fa44a788d3488c050c6218dbfba188bb8f3e Reviewed-on: https://skia-review.googlesource.com/9835 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkCanvas.h9
-rw-r--r--include/utils/SkDumpCanvas.h10
-rw-r--r--include/utils/SkLuaCanvas.h10
-rw-r--r--include/utils/SkNWayCanvas.h6
-rw-r--r--include/utils/SkNoDrawCanvas.h2
-rw-r--r--include/utils/SkPaintFilterCanvas.h6
6 files changed, 9 insertions, 34 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 85531bb74a..3a2b3fc09a 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -1442,13 +1442,14 @@ protected:
const SkPaint&);
virtual void onDrawRRect(const SkRRect&, const SkPaint&);
virtual void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPaint&);
+
+#ifdef SK_SUPPORT_LEGACY_DRAWVERTICES_VIRTUAL
virtual void onDrawVertices(VertexMode, int vertexCount, const SkPoint vertices[],
const SkPoint texs[], const SkColor colors[], SkBlendMode,
- const uint16_t indices[], int indexCount, const SkPaint&);
+ const uint16_t indices[], int indexCount, const SkPaint&) {}
+#endif
+
virtual void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&);
- // Subclasses can use this put the vertices object call on the regular draw vertices code path.
- // This is temporary until we teach recording and other SkCanvas classes about SkVertices.
- void devolveSkVerticesToRaw(const SkVertices*, SkBlendMode, const SkPaint&);
virtual void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[],
int count, SkBlendMode, const SkRect* cull, const SkPaint*);
diff --git a/include/utils/SkDumpCanvas.h b/include/utils/SkDumpCanvas.h
index 19e5da567d..b8fff72258 100644
--- a/include/utils/SkDumpCanvas.h
+++ b/include/utils/SkDumpCanvas.h
@@ -112,15 +112,7 @@ protected:
const SkPaint*, SrcRectConstraint) override;
void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst,
const SkPaint*) override;
- void onDrawVertices(VertexMode vmode, int vertexCount,
- const SkPoint vertices[], const SkPoint texs[],
- const SkColor colors[], SkBlendMode,
- const uint16_t indices[], int indexCount,
- const SkPaint&) override;
- void onDrawVerticesObject(const SkVertices* vertices, SkBlendMode mode,
- const SkPaint& paint) override {
- this->devolveSkVerticesToRaw(vertices, mode, paint);
- }
+ void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
void onClipRect(const SkRect&, SkClipOp, ClipEdgeStyle) override;
void onClipRRect(const SkRRect&, SkClipOp, ClipEdgeStyle) override;
diff --git a/include/utils/SkLuaCanvas.h b/include/utils/SkLuaCanvas.h
index a11d72f26c..49ff377af3 100644
--- a/include/utils/SkLuaCanvas.h
+++ b/include/utils/SkLuaCanvas.h
@@ -58,15 +58,7 @@ protected:
const SkPaint*, SrcRectConstraint) override;
void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst,
const SkPaint*) override;
- void onDrawVertices(VertexMode vmode, int vertexCount,
- const SkPoint vertices[], const SkPoint texs[],
- const SkColor colors[], SkBlendMode,
- const uint16_t indices[], int indexCount,
- const SkPaint&) override;
- void onDrawVerticesObject(const SkVertices* vertices, SkBlendMode mode,
- const SkPaint& paint) override {
- this->devolveSkVerticesToRaw(vertices, mode, paint);
- }
+ void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
void onClipRect(const SkRect&, SkClipOp, ClipEdgeStyle) override;
void onClipRRect(const SkRRect&, SkClipOp, ClipEdgeStyle) override;
diff --git a/include/utils/SkNWayCanvas.h b/include/utils/SkNWayCanvas.h
index 3ed7d4c41a..3407853fd6 100644
--- a/include/utils/SkNWayCanvas.h
+++ b/include/utils/SkNWayCanvas.h
@@ -70,11 +70,7 @@ protected:
const SkPaint*, SrcRectConstraint) override;
void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst,
const SkPaint*) override;
- void onDrawVertices(VertexMode vmode, int vertexCount,
- const SkPoint vertices[], const SkPoint texs[],
- const SkColor colors[], SkBlendMode,
- const uint16_t indices[], int indexCount,
- const SkPaint&) override;
+ void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
void onClipRect(const SkRect&, SkClipOp, ClipEdgeStyle) override;
void onClipRRect(const SkRRect&, SkClipOp, ClipEdgeStyle) override;
diff --git a/include/utils/SkNoDrawCanvas.h b/include/utils/SkNoDrawCanvas.h
index 75c15b201e..d21d678f16 100644
--- a/include/utils/SkNoDrawCanvas.h
+++ b/include/utils/SkNoDrawCanvas.h
@@ -66,8 +66,6 @@ protected:
const SkPaint*) override {}
void onDrawBitmapLattice(const SkBitmap&, const Lattice&, const SkRect&,
const SkPaint*) override {}
- void onDrawVertices(VertexMode, int, const SkPoint[], const SkPoint[], const SkColor[],
- SkBlendMode, const uint16_t[], int, const SkPaint&) override {}
void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override {}
void onDrawAtlas(const SkImage*, const SkRSXform[], const SkRect[], const SkColor[],
int, SkBlendMode, const SkRect*, const SkPaint*) override {}
diff --git a/include/utils/SkPaintFilterCanvas.h b/include/utils/SkPaintFilterCanvas.h
index 7dc7969e6e..31b3663730 100644
--- a/include/utils/SkPaintFilterCanvas.h
+++ b/include/utils/SkPaintFilterCanvas.h
@@ -74,11 +74,7 @@ protected:
const SkPaint*, SrcRectConstraint) override;
void onDrawImageNine(const SkImage*, const SkIRect& center, const SkRect& dst,
const SkPaint*) override;
- void onDrawVertices(VertexMode vmode, int vertexCount,
- const SkPoint vertices[], const SkPoint texs[],
- const SkColor colors[], SkBlendMode,
- const uint16_t indices[], int indexCount,
- const SkPaint&) override;
+ void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override;
void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
const SkPoint texCoords[4], SkBlendMode,
const SkPaint& paint) override;