Brian Salomon | fc527d2 | 2016-12-14 21:07:01 -0500 | [diff] [blame] | 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 | |
Robert Phillips | d2f53f9 | 2021-08-31 17:51:18 -0400 | [diff] [blame] | 8 | #ifndef DrawVerticesOp_DEFINED |
| 9 | #define DrawVerticesOp_DEFINED |
Brian Salomon | fc527d2 | 2016-12-14 21:07:01 -0500 | [diff] [blame] | 10 | |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 11 | #include "include/core/SkRefCnt.h" |
Mike Klein | c0bd9f9 | 2019-04-23 12:05:21 -0500 | [diff] [blame] | 12 | #include "include/private/GrTypesPriv.h" |
Brian Salomon | 4895946 | 2021-08-11 13:01:06 -0400 | [diff] [blame] | 13 | #include "src/gpu/ops/GrOp.h" |
Brian Salomon | fc527d2 | 2016-12-14 21:07:01 -0500 | [diff] [blame] | 14 | |
Robert Phillips | b6e9d3c | 2019-02-11 14:29:34 -0500 | [diff] [blame] | 15 | class GrColorSpaceXform; |
Robert Phillips | b6e9d3c | 2019-02-11 14:29:34 -0500 | [diff] [blame] | 16 | class GrPaint; |
Robert Phillips | b97da53 | 2019-02-12 15:24:12 -0500 | [diff] [blame] | 17 | class GrRecordingContext; |
Brian Osman | 449b115 | 2020-04-15 16:43:00 -0400 | [diff] [blame] | 18 | class SkMatrixProvider; |
Robert Phillips | d2f53f9 | 2021-08-31 17:51:18 -0400 | [diff] [blame] | 19 | class SkVertices; |
Brian Salomon | fc527d2 | 2016-12-14 21:07:01 -0500 | [diff] [blame] | 20 | |
Robert Phillips | d2f53f9 | 2021-08-31 17:51:18 -0400 | [diff] [blame] | 21 | namespace skgpu::v1::DrawVerticesOp { |
Brian Salomon | fc527d2 | 2016-12-14 21:07:01 -0500 | [diff] [blame] | 22 | |
Brian Salomon | 37da672 | 2021-11-04 15:57:27 -0400 | [diff] [blame] | 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 | GrOp::Owner Make(GrRecordingContext*, |
| 31 | GrPaint&&, |
| 32 | sk_sp<SkVertices>, |
| 33 | const SkMatrixProvider&, |
| 34 | GrAAType, |
| 35 | sk_sp<GrColorSpaceXform>, |
| 36 | GrPrimitiveType* overridePrimType); |
Brian Osman | 3c35842 | 2020-03-23 10:44:12 -0400 | [diff] [blame] | 37 | |
Robert Phillips | d2f53f9 | 2021-08-31 17:51:18 -0400 | [diff] [blame] | 38 | } // namespace skgpu::v1::DrawVerticesOp |
Brian Salomon | fc527d2 | 2016-12-14 21:07:01 -0500 | [diff] [blame] | 39 | |
Robert Phillips | d2f53f9 | 2021-08-31 17:51:18 -0400 | [diff] [blame] | 40 | #endif // DrawVerticesOp_DEFINED |