diff options
author | Chris Dalton <csmartdalton@google.com> | 2018-04-06 16:11:48 -0600 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-09 16:06:46 +0000 |
commit | 703b476fa4adc0af369728f7a150aaf12af7434f (patch) | |
tree | 91120816ebabf19a45e11b74a70726f482db819d /samplecode | |
parent | 9720687ee1c9b61c53677e6f12744c6af6323204 (diff) |
ccpr: Remove WindMethod from GrCCCoverageProcessor
Handles weighted triangles from the tessellator instead with a
"kWeightedTriangles" PrimitiveType.
Bug: skia:
Change-Id: I8a6f7b4205e1b3d6f340a30f3e90079ec44b8b6d
Reviewed-on: https://skia-review.googlesource.com/119202
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SampleCCPRGeometry.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/samplecode/SampleCCPRGeometry.cpp b/samplecode/SampleCCPRGeometry.cpp index ea3eafb591..7ddf91f0ae 100644 --- a/samplecode/SampleCCPRGeometry.cpp +++ b/samplecode/SampleCCPRGeometry.cpp @@ -204,7 +204,8 @@ void CCPRGeometryView::onDrawContent(SkCanvas* canvas) { SkRect::MakeIWH(this->width(), this->height())); // Add label. - caption.appendf("RenderPass_%s", GrCCCoverageProcessor::PrimitiveTypeName(fPrimitiveType)); + caption.appendf("PrimitiveType_%s", + GrCCCoverageProcessor::PrimitiveTypeName(fPrimitiveType)); if (PrimitiveType::kCubics == fPrimitiveType) { caption.appendf(" (%s)", SkCubicTypeName(fCubicType)); } @@ -295,8 +296,7 @@ void CCPRGeometryView::DrawCoverageCountOp::onExecute(GrOpFlushState* state) { ? static_cast<GrGLGpu*>(state->gpu()) : nullptr; - GrCCCoverageProcessor proc(rp, fView->fPrimitiveType, - GrCCCoverageProcessor::WindMethod::kCrossProduct); + GrCCCoverageProcessor proc(rp, fView->fPrimitiveType); SkDEBUGCODE(proc.enableDebugBloat(kDebugBloat)); SkSTArray<1, GrMesh> mesh; @@ -390,6 +390,9 @@ bool CCPRGeometryView::onQuery(SkEvent* evt) { if (SampleCode::CharQ(*evt, &unichar)) { if (unichar >= '1' && unichar <= '3') { fPrimitiveType = PrimitiveType(unichar - '1'); + if (fPrimitiveType >= PrimitiveType::kWeightedTriangles) { + fPrimitiveType = (PrimitiveType) ((int)fPrimitiveType + 1); + } this->updateAndInval(); return true; } |