Home | History | Annotate | Download | only in ops
      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 "GrTypesPriv.h"
     12 #include "SkRefCnt.h"
     13 #include "SkVertices.h"
     14 
     15 class GrColorSpaceXform;
     16 class GrDrawOp;
     17 class GrPaint;
     18 class GrRecordingContext;
     19 
     20 namespace GrDrawVerticesOp {
     21 
     22     /**
     23      * Draw a SkVertices. The GrPaint param's color is used if the vertices lack per-vertex color.
     24      * If the vertices lack local coords then the vertex positions are used as local coords. The
     25      * primitive type drawn is derived from the SkVertices object, unless overridePrimType is
     26      * specified.
     27      */
     28     std::unique_ptr<GrDrawOp> Make(GrRecordingContext*,
     29                                    GrPaint&&,
     30                                    sk_sp<SkVertices>,
     31                                    const SkVertices::Bone bones[],
     32                                    int boneCount,
     33                                    const SkMatrix& viewMatrix,
     34                                    GrAAType,
     35                                    sk_sp<GrColorSpaceXform>,
     36                                    GrPrimitiveType* overridePrimType = nullptr);
     37 };
     38 
     39 #endif
     40