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

Side by Side Diff: src/gpu/batches/GrMSAAPathRenderer.cpp

Issue 1950893002: Make GrPathRenderer only support fills for path stenciling (Closed) Base URL: https://skia.googlesource.com/skia.git@styleiface
Patch Set: Set draw params to fill in default impl of GrPR::onStencilPath Created 4 years, 7 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 | « src/gpu/batches/GrMSAAPathRenderer.h ('k') | src/gpu/batches/GrStencilAndCoverPathRenderer.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 2016 Google Inc. 2 * Copyright 2016 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 "GrMSAAPathRenderer.h" 8 #include "GrMSAAPathRenderer.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 19 matching lines...) Expand all
30 // Helpers for drawPath 30 // Helpers for drawPath
31 31
32 static inline bool single_pass_path(const SkPath& path, const SkStrokeRec& strok e) { 32 static inline bool single_pass_path(const SkPath& path, const SkStrokeRec& strok e) {
33 if (!path.isInverseFillType()) { 33 if (!path.isInverseFillType()) {
34 return path.isConvex(); 34 return path.isConvex();
35 } 35 }
36 return false; 36 return false;
37 } 37 }
38 38
39 GrPathRenderer::StencilSupport 39 GrPathRenderer::StencilSupport
40 GrMSAAPathRenderer::onGetStencilSupport(const SkPath& path, const GrStrokeInfo& stroke) const { 40 GrMSAAPathRenderer::onGetStencilSupport(const SkPath& path) const {
41 if (single_pass_path(path, stroke)) { 41 if (single_pass_path(path, SkStrokeRec(SkStrokeRec::kFill_InitStyle))) {
42 return GrPathRenderer::kNoRestriction_StencilSupport; 42 return GrPathRenderer::kNoRestriction_StencilSupport;
43 } else { 43 } else {
44 return GrPathRenderer::kStencilOnly_StencilSupport; 44 return GrPathRenderer::kStencilOnly_StencilSupport;
45 } 45 }
46 } 46 }
47 47
48 struct MSAALineVertices { 48 struct MSAALineVertices {
49 struct Vertex { 49 struct Vertex {
50 SkPoint fPosition; 50 SkPoint fPosition;
51 SkColor fColor; 51 SkColor fColor;
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 path, 732 path,
733 stroke, 733 stroke,
734 false); 734 false);
735 } 735 }
736 736
737 void GrMSAAPathRenderer::onStencilPath(const StencilPathArgs& args) { 737 void GrMSAAPathRenderer::onStencilPath(const StencilPathArgs& args) {
738 GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(),"GrMSAAPathRenderer: :onStencilPath"); 738 GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(),"GrMSAAPathRenderer: :onStencilPath");
739 SkASSERT(SkPath::kInverseEvenOdd_FillType != args.fPath->getFillType()); 739 SkASSERT(SkPath::kInverseEvenOdd_FillType != args.fPath->getFillType());
740 SkASSERT(SkPath::kInverseWinding_FillType != args.fPath->getFillType()); 740 SkASSERT(SkPath::kInverseWinding_FillType != args.fPath->getFillType());
741 this->internalDrawPath(args.fTarget, args.fPipelineBuilder, GrColor_WHITE, * args.fViewMatrix, 741 this->internalDrawPath(args.fTarget, args.fPipelineBuilder, GrColor_WHITE, * args.fViewMatrix,
742 *args.fPath, *args.fStroke, true); 742 *args.fPath, GrStrokeInfo::FillInfo(), true);
743 } 743 }
744 744
745 //////////////////////////////////////////////////////////////////////////////// /////////////////// 745 //////////////////////////////////////////////////////////////////////////////// ///////////////////
OLDNEW
« no previous file with comments | « src/gpu/batches/GrMSAAPathRenderer.h ('k') | src/gpu/batches/GrStencilAndCoverPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698