From 622650a1949f9a68793ac895d9fbadee7177d860 Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Wed, 7 Mar 2018 17:30:10 -0700 Subject: 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 --- 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 2a7d6640a6..272c59fbff 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()); - state->rtCommandBuffer()->draw(pipeline, proc, mesh.begin(), nullptr, 1, this->bounds()); + proc.draw(state, pipeline, 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 <= '4') { + if (unichar >= '1' && unichar <= '3') { fRenderPass = RenderPass(unichar - '1'); this->updateAndInval(); return true; -- cgit v1.2.3