Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: src/gpu/GrDefaultPathRenderer.cpp

Issue 1072273007: Improve the curve tessellation subdivision of the path renderers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/gpu/GrPathUtils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrPathUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698