blob: 400be1db89c3fb79aa529264ca56d38e1324a863 [file] [log] [blame]
Brian Salomonfc527d22016-12-14 21:07:01 -05001/*
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 Phillipsd2f53f92021-08-31 17:51:18 -04008#ifndef DrawVerticesOp_DEFINED
9#define DrawVerticesOp_DEFINED
Brian Salomonfc527d22016-12-14 21:07:01 -050010
Mike Kleinc0bd9f92019-04-23 12:05:21 -050011#include "include/core/SkRefCnt.h"
Mike Kleinc0bd9f92019-04-23 12:05:21 -050012#include "include/private/GrTypesPriv.h"
Brian Salomon48959462021-08-11 13:01:06 -040013#include "src/gpu/ops/GrOp.h"
Brian Salomonfc527d22016-12-14 21:07:01 -050014
Robert Phillipsb6e9d3c2019-02-11 14:29:34 -050015class GrColorSpaceXform;
Robert Phillipsb6e9d3c2019-02-11 14:29:34 -050016class GrPaint;
Robert Phillipsb97da532019-02-12 15:24:12 -050017class GrRecordingContext;
Brian Osman449b1152020-04-15 16:43:00 -040018class SkMatrixProvider;
Robert Phillipsd2f53f92021-08-31 17:51:18 -040019class SkVertices;
Brian Salomonfc527d22016-12-14 21:07:01 -050020
Robert Phillipsd2f53f92021-08-31 17:51:18 -040021namespace skgpu::v1::DrawVerticesOp {
Brian Salomonfc527d22016-12-14 21:07:01 -050022
Brian Salomon37da6722021-11-04 15:57:27 -040023/**
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 */
30GrOp::Owner Make(GrRecordingContext*,
31 GrPaint&&,
32 sk_sp<SkVertices>,
33 const SkMatrixProvider&,
34 GrAAType,
35 sk_sp<GrColorSpaceXform>,
36 GrPrimitiveType* overridePrimType);
Brian Osman3c358422020-03-23 10:44:12 -040037
Robert Phillipsd2f53f92021-08-31 17:51:18 -040038} // namespace skgpu::v1::DrawVerticesOp
Brian Salomonfc527d22016-12-14 21:07:01 -050039
Robert Phillipsd2f53f92021-08-31 17:51:18 -040040#endif // DrawVerticesOp_DEFINED