GrDrawVerticesOp.h 1.3 KB

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