From fe462efbcb105914e4c4bbf689525b530a438773 Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Thu, 8 Mar 2018 15:54:01 +0000 Subject: Revert "ccpr: Simplify triangle corners" This reverts commit 622650a1949f9a68793ac895d9fbadee7177d860. Reason for revert: Going to try to improve AAA quality on curve corners Original change's description: > ccpr: Simplify triangle corners > > Modifies triangle corner shaders to just approximate their coverage with > linear values that ramp to zero at bloat vertices outside the triangle. > > For the vertex backend, since corners now have the same fragment shader > as the rest of the triangle, we fold them in with the other steps and > draw triangles in a single pass. > > The geometry backend still draws triangles in two passes, as there is > not an apparent performance advantage in combining them. > > Bug: skia: > Change-Id: Ib4a89d793a3c706f734d0271875c8a3e5c87c49b > Reviewed-on: https://skia-review.googlesource.com/112632 > Commit-Queue: Chris Dalton > Reviewed-by: Brian Salomon TBR=bsalomon@google.com,csmartdalton@google.com Change-Id: I45e7b9d7d7f8452b28bd54ca1e90a1f046cb2462 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/113180 Reviewed-by: Chris Dalton Commit-Queue: Chris Dalton --- samplecode/SampleCCPRGeometry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'samplecode') diff --git a/samplecode/SampleCCPRGeometry.cpp b/samplecode/SampleCCPRGeometry.cpp index 272c59fbff..2a7d6640a6 100644 --- a/samplecode/SampleCCPRGeometry.cpp +++ b/samplecode/SampleCCPRGeometry.cpp @@ -280,7 +280,7 @@ void CCPRGeometryView::Op::onExecute(GrOpFlushState* state) { if (!mesh.empty()) { SkASSERT(1 == mesh.count()); - proc.draw(state, pipeline, mesh.begin(), nullptr, 1, this->bounds()); + state->rtCommandBuffer()->draw(pipeline, proc, mesh.begin(), nullptr, 1, this->bounds()); } if (glGpu) { @@ -337,7 +337,7 @@ bool CCPRGeometryView::onQuery(SkEvent* evt) { } SkUnichar unichar; if (SampleCode::CharQ(*evt, &unichar)) { - if (unichar >= '1' && unichar <= '3') { + if (unichar >= '1' && unichar <= '4') { fRenderPass = RenderPass(unichar - '1'); this->updateAndInval(); return true; -- cgit v1.2.3