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 "GrBatch.h" | 10 #include "GrBatch.h" |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 fBatch.fUsesLocalCoords = init.fUsesLocalCoords; | 248 fBatch.fUsesLocalCoords = init.fUsesLocalCoords; |
249 fBatch.fCoverageIgnored = init.fCoverageIgnored; | 249 fBatch.fCoverageIgnored = init.fCoverageIgnored; |
250 } | 250 } |
251 | 251 |
252 void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline
) override { | 252 void generateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeline
) override { |
253 SkAutoTUnref<const GrGeometryProcessor> gp( | 253 SkAutoTUnref<const GrGeometryProcessor> gp( |
254 GrDefaultGeoProcFactory::Create(GrDefaultGeoProcFactory::kPositi
on_GPType, | 254 GrDefaultGeoProcFactory::Create(GrDefaultGeoProcFactory::kPositi
on_GPType, |
255 this->color(), | 255 this->color(), |
256 this->viewMatrix(), | 256 this->viewMatrix(), |
257 SkMatrix::I(), | 257 SkMatrix::I(), |
| 258 false, |
258 this->coverage())); | 259 this->coverage())); |
259 | 260 |
260 size_t vertexStride = gp->getVertexStride(); | 261 size_t vertexStride = gp->getVertexStride(); |
261 SkASSERT(vertexStride == sizeof(SkPoint)); | 262 SkASSERT(vertexStride == sizeof(SkPoint)); |
262 | 263 |
263 batchTarget->initDraw(gp, pipeline); | 264 batchTarget->initDraw(gp, pipeline); |
264 | 265 |
265 // TODO this is hacky, but the only way we have to initialize the GP is
to use the | 266 // TODO this is hacky, but the only way we have to initialize the GP is
to use the |
266 // GrPipelineInfo struct so we can generate the correct shader. Once we
have GrBatch | 267 // GrPipelineInfo struct so we can generate the correct shader. Once we
have GrBatch |
267 // everywhere we can remove this nastiness | 268 // everywhere we can remove this nastiness |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 | 745 |
745 void GrDefaultPathRenderer::onStencilPath(GrDrawTarget* target, | 746 void GrDefaultPathRenderer::onStencilPath(GrDrawTarget* target, |
746 GrPipelineBuilder* pipelineBuilder, | 747 GrPipelineBuilder* pipelineBuilder, |
747 const SkMatrix& viewMatrix, | 748 const SkMatrix& viewMatrix, |
748 const SkPath& path, | 749 const SkPath& path, |
749 const GrStrokeInfo& stroke) { | 750 const GrStrokeInfo& stroke) { |
750 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); | 751 SkASSERT(SkPath::kInverseEvenOdd_FillType != path.getFillType()); |
751 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); | 752 SkASSERT(SkPath::kInverseWinding_FillType != path.getFillType()); |
752 this->internalDrawPath(target, pipelineBuilder, GrColor_WHITE, viewMatrix, p
ath, stroke, true); | 753 this->internalDrawPath(target, pipelineBuilder, GrColor_WHITE, viewMatrix, p
ath, stroke, true); |
753 } | 754 } |
OLD | NEW |