| OLD | NEW | 
|---|
| 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  Loading... | 
| 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  Loading... | 
| 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 } | 
| OLD | NEW | 
|---|