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 "GrBatchFlushState.h" | 10 #include "GrBatchFlushState.h" |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 false); | 622 false); |
623 } | 623 } |
624 | 624 |
625 void GrDefaultPathRenderer::onStencilPath(const StencilPathArgs& args) { | 625 void GrDefaultPathRenderer::onStencilPath(const StencilPathArgs& args) { |
626 GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(), | 626 GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(), |
627 "GrDefaultPathRenderer::onStencilPath"); | 627 "GrDefaultPathRenderer::onStencilPath"); |
628 SkASSERT(SkPath::kInverseEvenOdd_FillType != args.fPath->getFillType()); | 628 SkASSERT(SkPath::kInverseEvenOdd_FillType != args.fPath->getFillType()); |
629 SkASSERT(SkPath::kInverseWinding_FillType != args.fPath->getFillType()); | 629 SkASSERT(SkPath::kInverseWinding_FillType != args.fPath->getFillType()); |
630 | 630 |
631 GrPaint paint; | 631 GrPaint paint; |
632 paint.setXPFactory(GrDisableColorXPFactory::Create()); | 632 SkSafeUnref(paint.setXPFactory(GrDisableColorXPFactory::Create())); |
633 paint.setAntiAlias(args.fIsAA); | 633 paint.setAntiAlias(args.fIsAA); |
634 | 634 |
635 this->internalDrawPath(args.fDrawContext, | 635 this->internalDrawPath(args.fDrawContext, |
636 paint, | 636 paint, |
637 &GrUserStencilSettings::kUnused, | 637 &GrUserStencilSettings::kUnused, |
638 *args.fClip, | 638 *args.fClip, |
639 GrColor_WHITE, | 639 GrColor_WHITE, |
640 *args.fViewMatrix, | 640 *args.fViewMatrix, |
641 *args.fPath, | 641 *args.fPath, |
642 GrStyle::SimpleFill(), | 642 GrStyle::SimpleFill(), |
(...skipping 22 matching lines...) Expand all Loading... |
665 geometry.fColor = color; | 665 geometry.fColor = color; |
666 geometry.fPath = path; | 666 geometry.fPath = path; |
667 geometry.fTolerance = srcSpaceTol; | 667 geometry.fTolerance = srcSpaceTol; |
668 | 668 |
669 viewMatrix.mapRect(&bounds); | 669 viewMatrix.mapRect(&bounds); |
670 uint8_t coverage = GrRandomCoverage(random); | 670 uint8_t coverage = GrRandomCoverage(random); |
671 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds
); | 671 return DefaultPathBatch::Create(geometry, coverage, viewMatrix, true, bounds
); |
672 } | 672 } |
673 | 673 |
674 #endif | 674 #endif |
OLD | NEW |