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 "GrBatchFlushState.h" | 10 #include "GrBatchFlushState.h" |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 } | 547 } |
548 } else { | 548 } else { |
549 bounds = path.getBounds(); | 549 bounds = path.getBounds(); |
550 } | 550 } |
551 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S
kMatrix::I() : | 551 const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? S
kMatrix::I() : |
552 v
iewMatrix; | 552 v
iewMatrix; |
553 SkAutoTUnref<GrDrawBatch> batch( | 553 SkAutoTUnref<GrDrawBatch> batch( |
554 GrRectBatchFactory::CreateNonAAFill(paint.getColor(), viewM,
bounds, nullptr, | 554 GrRectBatchFactory::CreateNonAAFill(paint.getColor(), viewM,
bounds, nullptr, |
555 &localMatrix)); | 555 &localMatrix)); |
556 | 556 |
557 SkASSERT(GrPipelineBuilder::kBoth_DrawFace == drawFace[p]); | |
558 GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(pa
int)); | 557 GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(pa
int)); |
559 pipelineBuilder.setDrawFace(drawFace[p]); | 558 pipelineBuilder.setDrawFace(drawFace[p]); |
560 if (passes[p]) { | 559 if (passes[p]) { |
561 pipelineBuilder.setUserStencil(passes[p]); | 560 pipelineBuilder.setUserStencil(passes[p]); |
562 } else { | 561 } else { |
563 pipelineBuilder.setUserStencil(userStencilSettings); | 562 pipelineBuilder.setUserStencil(userStencilSettings); |
564 } | 563 } |
565 | 564 |
566 drawContext->drawBatch(pipelineBuilder, clip, batch); | 565 drawContext->drawBatch(pipelineBuilder, clip, batch); |
567 } else { | 566 } else { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 SkRect bounds = path.getBounds(); | 635 SkRect bounds = path.getBounds(); |
637 SkScalar tol = GrPathUtils::kDefaultTolerance; | 636 SkScalar tol = GrPathUtils::kDefaultTolerance; |
638 SkScalar srcSpaceTol = GrPathUtils::scaleToleranceToSrc(tol, viewMatrix, bou
nds); | 637 SkScalar srcSpaceTol = GrPathUtils::scaleToleranceToSrc(tol, viewMatrix, bou
nds); |
639 | 638 |
640 viewMatrix.mapRect(&bounds); | 639 viewMatrix.mapRect(&bounds); |
641 uint8_t coverage = GrRandomCoverage(random); | 640 uint8_t coverage = GrRandomCoverage(random); |
642 return new DefaultPathBatch(color, path, srcSpaceTol, coverage, viewMatrix,
true, bounds); | 641 return new DefaultPathBatch(color, path, srcSpaceTol, coverage, viewMatrix,
true, bounds); |
643 } | 642 } |
644 | 643 |
645 #endif | 644 #endif |
OLD | NEW |