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

Side by Side Diff: src/gpu/batches/GrStencilAndCoverPathRenderer.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
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 8
9 #include "GrStencilAndCoverPathRenderer.h" 9 #include "GrStencilAndCoverPathRenderer.h"
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } else { 59 } else {
60 SkASSERT(path->isEqualTo(skPath, stroke)); 60 SkASSERT(path->isEqualTo(skPath, stroke));
61 } 61 }
62 return path.release(); 62 return path.release();
63 } 63 }
64 64
65 void GrStencilAndCoverPathRenderer::onStencilPath(const StencilPathArgs& args) { 65 void GrStencilAndCoverPathRenderer::onStencilPath(const StencilPathArgs& args) {
66 GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(), 66 GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(),
67 "GrStencilAndCoverPathRenderer::onStencilPath"); 67 "GrStencilAndCoverPathRenderer::onStencilPath");
68 SkASSERT(!args.fPath->isInverseFillType()); 68 SkASSERT(!args.fPath->isInverseFillType());
69 SkAutoTUnref<GrPath> p(get_gr_path(fResourceProvider, *args.fPath, *args.fSt roke)); 69 SkAutoTUnref<GrPath> p(get_gr_path(fResourceProvider, *args.fPath, GrStrokeI nfo::FillInfo()));
70 args.fTarget->stencilPath(*args.fPipelineBuilder, *args.fViewMatrix, p, p->g etFillType()); 70 args.fTarget->stencilPath(*args.fPipelineBuilder, *args.fViewMatrix, p, p->g etFillType());
71 } 71 }
72 72
73 bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) { 73 bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
74 GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(), 74 GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(),
75 "GrStencilAndCoverPathRenderer::onDrawPath"); 75 "GrStencilAndCoverPathRenderer::onDrawPath");
76 SkASSERT(!args.fStroke->isHairlineStyle()); 76 SkASSERT(!args.fStroke->isHairlineStyle());
77 const SkPath& path = *args.fPath; 77 const SkPath& path = *args.fPath;
78 GrPipelineBuilder* pipelineBuilder = args.fPipelineBuilder; 78 GrPipelineBuilder* pipelineBuilder = args.fPipelineBuilder;
79 const SkMatrix& viewMatrix = *args.fViewMatrix; 79 const SkMatrix& viewMatrix = *args.fViewMatrix;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 pipelineBuilder->setStencil(kStencilPass); 142 pipelineBuilder->setStencil(kStencilPass);
143 SkAutoTUnref<GrDrawPathBatchBase> batch( 143 SkAutoTUnref<GrDrawPathBatchBase> batch(
144 GrDrawPathBatch::Create(viewMatrix, args.fColor, p->getFillType( ), p)); 144 GrDrawPathBatch::Create(viewMatrix, args.fColor, p->getFillType( ), p));
145 args.fTarget->drawPathBatch(*pipelineBuilder, batch); 145 args.fTarget->drawPathBatch(*pipelineBuilder, batch);
146 } 146 }
147 147
148 pipelineBuilder->stencil()->setDisabled(); 148 pipelineBuilder->stencil()->setDisabled();
149 return true; 149 return true;
150 } 150 }
OLDNEW
« no previous file with comments | « src/gpu/batches/GrStencilAndCoverPathRenderer.h ('k') | src/gpu/batches/GrTessellatingPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698