diff options
author | 2017-04-05 14:01:25 -0400 | |
---|---|---|
committer | 2017-04-06 12:58:46 +0000 | |
commit | 9d9172fe2c798eb2a1fe2cce51feb157050294d9 (patch) | |
tree | 1c3d1a2b4d2c8aaf3cafc732280c85077edf1a05 /include | |
parent | dc57b5d49647b6f6685df998ee7d81200ba7f652 (diff) |
remove legacy vertices flag and code
Bug: skia:6366
Change-Id: Ibea5f71c5ff570e4f3ccec7d064893602c3335cf
Reviewed-on: https://skia-review.googlesource.com/11359
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkCanvas.h | 43 | ||||
-rw-r--r-- | include/core/SkVertices.h | 27 |
2 files changed, 0 insertions, 70 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 4c875e8f44..c44965e110 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -1099,49 +1099,6 @@ public: } #endif -#ifdef SK_SUPPORT_LEGACY_CANVAS_VERTICES - enum VertexMode { - kTriangles_VertexMode, - kTriangleStrip_VertexMode, - kTriangleFan_VertexMode - }; - - /** Draw the array of vertices, interpreted as triangles (based on mode). - - If both textures and vertex-colors are NULL, it strokes hairlines with - the paint's color. This behavior is a useful debugging mode to visualize - the mesh. - - @param vmode How to interpret the array of vertices - @param vertexCount The number of points in the vertices array (and - corresponding texs and colors arrays if non-null) - @param vertices Array of vertices for the mesh - @param texs May be null. If not null, specifies the coordinate - in _texture_ space (not uv space) for each vertex. - @param colors May be null. If not null, specifies a color for each - vertex, to be interpolated across the triangle. - @param mode Used if both texs and colors are present and paint has a - shader. In this case the colors are combined with the texture - using mode, before being drawn using the paint. - @param indices If not null, array of indices to reference into the - vertex (texs, colors) array. - @param indexCount number of entries in the indices array (if not null) - @param paint Specifies the shader/texture if present. - */ - void drawVertices(VertexMode vmode, int vertexCount, - const SkPoint vertices[], const SkPoint texs[], - const SkColor colors[], SkBlendMode mode, - const uint16_t indices[], int indexCount, - const SkPaint& paint); - void drawVertices(VertexMode vmode, int vertexCount, - const SkPoint vertices[], const SkPoint texs[], - const SkColor colors[], const uint16_t indices[], int indexCount, - const SkPaint& paint) { - this->drawVertices(vmode, vertexCount, vertices, texs, colors, SkBlendMode::kModulate, - indices, indexCount, paint); - } -#endif - /** Draw vertices from an immutable SkVertices object. @param vertices The mesh to draw. diff --git a/include/core/SkVertices.h b/include/core/SkVertices.h index 7006850fbc..a245c18502 100644 --- a/include/core/SkVertices.h +++ b/include/core/SkVertices.h @@ -14,10 +14,6 @@ #include "SkRect.h" #include "SkRefCnt.h" -#ifdef SK_SUPPORT_LEGACY_CANVAS_VERTICES -#include "SkCanvas.h" -#endif - /** * An immutable set of vertex data that can be used with SkCanvas::drawVertices. */ @@ -47,25 +43,6 @@ public: return MakeCopy(mode, vertexCount, positions, texs, colors, 0, nullptr); } -#ifdef SK_SUPPORT_LEGACY_CANVAS_VERTICES - static sk_sp<SkVertices> MakeCopy(SkCanvas::VertexMode mode, int vertexCount, - const SkPoint positions[], - const SkPoint texs[], - const SkColor colors[], - int indexCount, - const uint16_t indices[]) { - return MakeCopy(static_cast<VertexMode>(mode), vertexCount, positions, texs, colors, - indexCount, indices); - } - - static sk_sp<SkVertices> MakeCopy(SkCanvas::VertexMode mode, int vertexCount, - const SkPoint positions[], - const SkPoint texs[], - const SkColor colors[]) { - return MakeCopy(static_cast<VertexMode>(mode), vertexCount, positions, texs, colors); - } -#endif - struct Sizes; enum BuilderFlags { @@ -76,10 +53,6 @@ public: public: Builder(VertexMode mode, int vertexCount, int indexCount, uint32_t flags); -#ifdef SK_SUPPORT_LEGACY_CANVAS_VERTICES - Builder(SkCanvas::VertexMode mode, int vertexCount, int indexCount, uint32_t flags); -#endif - bool isValid() const { return fVertices != nullptr; } // if the builder is invalid, these will return 0 |