| 1 | /* |
| 2 | * Copyright 2015 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef GrDrawVerticesOp_DEFINED |
| 9 | #define GrDrawVerticesOp_DEFINED |
| 10 | |
| 11 | #include "include/core/SkRefCnt.h" |
| 12 | #include "include/private/GrTypesPriv.h" |
| 13 | |
| 14 | class GrColorSpaceXform; |
| 15 | class GrDrawOp; |
| 16 | class GrPaint; |
| 17 | class GrRecordingContext; |
| 18 | class SkM44; |
| 19 | class SkRuntimeEffect; |
| 20 | |
| 21 | namespace GrDrawVerticesOp { |
| 22 | |
| 23 | /** |
| 24 | * Draw a SkVertices. The GrPaint param's color is used if the vertices lack per-vertex color. |
| 25 | * If the vertices lack local coords then the vertex positions are used as local coords. The |
| 26 | * primitive type drawn is derived from the SkVertices object, unless overridePrimType is |
| 27 | * specified. If an SkRuntimeEffect is provided, it may expect some number of input varyings, |
| 28 | * which should match the number of extra per-vertex values in the SkVertices. |
| 29 | */ |
| 30 | std::unique_ptr<GrDrawOp> Make(GrRecordingContext*, |
| 31 | GrPaint&&, |
| 32 | sk_sp<SkVertices>, |
| 33 | const SkMatrix& viewMatrix, |
| 34 | GrAAType, |
| 35 | sk_sp<GrColorSpaceXform>, |
| 36 | GrPrimitiveType* overridePrimType, |
| 37 | const SkRuntimeEffect*, |
| 38 | const SkM44* localToWorld); |
| 39 | |
| 40 | }; |
| 41 | |
| 42 | #endif |
| 43 | |