GrDashOp.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright 2014 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 GrDashOp_DEFINED
  8. #define GrDashOp_DEFINED
  9. #include "include/core/SkPathEffect.h"
  10. #include "include/gpu/GrTypes.h"
  11. class GrDrawOp;
  12. class GrPaint;
  13. class GrRecordingContext;
  14. class GrStyle;
  15. struct GrUserStencilSettings;
  16. namespace GrDashOp {
  17. enum class AAMode {
  18. kNone,
  19. kCoverage,
  20. kCoverageWithMSAA,
  21. };
  22. static const int kAAModeCnt = static_cast<int>(AAMode::kCoverageWithMSAA) + 1;
  23. std::unique_ptr<GrDrawOp> MakeDashLineOp(GrRecordingContext*,
  24. GrPaint&&,
  25. const SkMatrix& viewMatrix,
  26. const SkPoint pts[2],
  27. AAMode,
  28. const GrStyle& style,
  29. const GrUserStencilSettings*);
  30. bool CanDrawDashLine(const SkPoint pts[2], const GrStyle& style, const SkMatrix& viewMatrix);
  31. }
  32. #endif