OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrDefaultPathRenderer.h" | 8 #include "GrDefaultPathRenderer.h" |
9 | 9 |
10 #include "GrBatch.h" | 10 #include "GrBatch.h" |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 } | 651 } |
652 } | 652 } |
653 break; | 653 break; |
654 default: | 654 default: |
655 SkDEBUGFAIL("Unknown path fFill!"); | 655 SkDEBUGFAIL("Unknown path fFill!"); |
656 return false; | 656 return false; |
657 } | 657 } |
658 } | 658 } |
659 } | 659 } |
660 | 660 |
661 SkScalar tol = SK_Scalar1; | 661 SkScalar tol = GrPathUtils::kDefaultTolerance; |
662 SkScalar srcSpaceTol = GrPathUtils::scaleToleranceToSrc(tol, viewMatrix, pat
h.getBounds()); | 662 SkScalar srcSpaceTol = GrPathUtils::scaleToleranceToSrc(tol, viewMatrix, pat
h.getBounds()); |
663 | 663 |
664 SkRect devBounds; | 664 SkRect devBounds; |
665 GetPathDevBounds(path, pipelineBuilder->getRenderTarget(), viewMatrix, &devB
ounds); | 665 GetPathDevBounds(path, pipelineBuilder->getRenderTarget(), viewMatrix, &devB
ounds); |
666 | 666 |
667 for (int p = 0; p < passCount; ++p) { | 667 for (int p = 0; p < passCount; ++p) { |
668 pipelineBuilder->setDrawFace(drawFace[p]); | 668 pipelineBuilder->setDrawFace(drawFace[p]); |
669 if (passes[p]) { | 669 if (passes[p]) { |
670 *pipelineBuilder->stencil() = *passes[p]; | 670 *pipelineBuilder->stencil() = *passes[p]; |
671 } | 671 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 | 745 |
746 void GrDefaultPathRenderer::onStencilPath(GrDrawTarget* target, | 746 void GrDefaultPathRenderer::onStencilPath(GrDrawTarget* target, |
747 GrPipelineBuilder* pipelineBuilder, | 747 GrPipelineBuilder* pipelineBuilder, |
748 const SkMatrix& viewMatrix, | 748 const SkMatrix& viewMatrix, |
749 const SkPath& path, | 749 const SkPath& path, |
750 const SkStrokeRec& stroke) { | 750 const SkStrokeRec& stroke) { |
751 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); | 751 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); |
752 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); | 752 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); |
753 this->internalDrawPath(target, pipelineBuilder, GrColor_WHITE, viewMatrix, p
ath, stroke, true); | 753 this->internalDrawPath(target, pipelineBuilder, GrColor_WHITE, viewMatrix, p
ath, stroke, true); |
754 } | 754 } |
OLD | NEW |