GrTessellatingPathRenderer.h 946 B

12345678910111213141516171819202122232425262728293031323334353637
  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 GrTessellatingPathRenderer_DEFINED
  8. #define GrTessellatingPathRenderer_DEFINED
  9. #include "src/gpu/GrPathRenderer.h"
  10. /**
  11. * Subclass that renders the path by converting to screen-space trapezoids plus
  12. * extra 1-pixel geometry for AA.
  13. */
  14. class SK_API GrTessellatingPathRenderer : public GrPathRenderer {
  15. public:
  16. GrTessellatingPathRenderer();
  17. #if GR_TEST_UTILS
  18. void setMaxVerbCount(int maxVerbCount) { fMaxVerbCount = maxVerbCount; }
  19. #endif
  20. private:
  21. CanDrawPath onCanDrawPath(const CanDrawPathArgs&) const override;
  22. StencilSupport onGetStencilSupport(const GrShape&) const override {
  23. return GrPathRenderer::kNoSupport_StencilSupport;
  24. }
  25. bool onDrawPath(const DrawPathArgs&) override;
  26. int fMaxVerbCount;
  27. typedef GrPathRenderer INHERITED;
  28. };
  29. #endif