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