diff options
author | Mike Reed <reed@google.com> | 2017-04-03 11:11:09 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-03 15:50:16 +0000 |
commit | 887cdf112809727c51890ba8b98b3ddce22249f0 (patch) | |
tree | 6ae2774f9ec869f72cf117993eba25c6ef97e28b /tests | |
parent | b55dd553124cd00260bc9e3a63ec8a8fe09412a8 (diff) |
move vertex-mode enum into SkVertices
BUG=skia:6366
Change-Id: I3c0bf96cce6d32c9b8d12d16a772aaa6f18981aa
Reviewed-on: https://skia-review.googlesource.com/11062
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/BlitRowTest.cpp | 6 | ||||
-rw-r--r-- | tests/CanvasTest.cpp | 6 | ||||
-rw-r--r-- | tests/VerticesTest.cpp | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/tests/BlitRowTest.cpp b/tests/BlitRowTest.cpp index 3439a5e09d..d2f333dbb6 100644 --- a/tests/BlitRowTest.cpp +++ b/tests/BlitRowTest.cpp @@ -10,6 +10,7 @@ #include "SkColorPriv.h" #include "SkGradientShader.h" #include "SkRect.h" +#include "SkVertices.h" #include "Test.h" #include "sk_tool_utils.h" @@ -173,8 +174,9 @@ struct Mesh { } void draw(SkCanvas* canvas, SkPaint* paint) { - canvas->drawVertices(SkCanvas::kTriangleFan_VertexMode, 4, fPts, fPts, - nullptr, SkBlendMode::kModulate, nullptr, 0, *paint); + canvas->drawVertices(SkVertices::MakeCopy(SkVertices::kTriangleFan_VertexMode, 4, fPts, + fPts, nullptr), + SkBlendMode::kModulate, *paint); } }; diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp index 8327b555cc..9e7de67165 100644 --- a/tests/CanvasTest.cpp +++ b/tests/CanvasTest.cpp @@ -65,6 +65,7 @@ #include "SkSurface.h" #include "SkTemplates.h" #include "SkTDArray.h" +#include "SkVertices.h" #include "Test.h" DEF_TEST(canvas_clipbounds, reporter) { @@ -476,8 +477,9 @@ static void DrawVerticesShaderTestStep(SkCanvas* canvas, const TestData& d, SkPaint paint; paint.setShader(SkShader::MakeBitmapShader(d.fBitmap, SkShader::kClamp_TileMode, SkShader::kClamp_TileMode)); - canvas->drawVertices(SkCanvas::kTriangleFan_VertexMode, 4, pts, pts, - nullptr, SkBlendMode::kModulate, nullptr, 0, paint); + canvas->drawVertices(SkVertices::MakeCopy(SkVertices::kTriangleFan_VertexMode, 4, pts, pts, + nullptr), + SkBlendMode::kModulate, paint); } // NYI: issue 240. TEST_STEP_NO_PDF(DrawVerticesShader, DrawVerticesShaderTestStep); diff --git a/tests/VerticesTest.cpp b/tests/VerticesTest.cpp index 9621d80cd0..5c5c6af41d 100644 --- a/tests/VerticesTest.cpp +++ b/tests/VerticesTest.cpp @@ -59,7 +59,7 @@ DEF_TEST(Vertices, reporter) { for (auto colF : colFlags) { uint32_t flags = texF | colF; - SkVertices::Builder builder(SkCanvas::kTriangles_VertexMode, vCount, iCount, flags); + SkVertices::Builder builder(SkVertices::kTriangles_VertexMode, vCount, iCount, flags); for (int i = 0; i < vCount; ++i) { float x = (float)i; |