From 52076d1df56fc2eef7c78fe4f2a9930aba59e803 Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Wed, 21 Mar 2018 12:14:10 -0600 Subject: ccpr: Use a more stable formula to find quadratic coordinates The 3x3 inverse grew unstable on small curves with large coordinates, not to mention being inefficient. This fixes many bad pixels on the chalkboard. Also begins scaling curve gradients by the AA bloat, in order to match triangle edges more closely and visualize curve AA in the ccpr sample. Bug: skia: Change-Id: I0f7da2e7599d4d5c458b3dd307185679dc78bb50 Reviewed-on: https://skia-review.googlesource.com/115527 Commit-Queue: Chris Dalton Reviewed-by: Greg Daniel --- samplecode/SampleCCPRGeometry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'samplecode') diff --git a/samplecode/SampleCCPRGeometry.cpp b/samplecode/SampleCCPRGeometry.cpp index 4d4bfcf49e..c6174516d3 100644 --- a/samplecode/SampleCCPRGeometry.cpp +++ b/samplecode/SampleCCPRGeometry.cpp @@ -310,7 +310,7 @@ void CCPRGeometryView::DrawCoverageCountOp::drawRenderPass(GrOpFlushState* state SkDEBUGCODE(proc.enableDebugBloat(kDebugBloat)); SkSTArray<1, GrMesh> mesh; - if (RenderPass::kCubics == renderPass) { + if (GrCCCoverageProcessor::RenderPassIsCubic(renderPass)) { sk_sp instBuff(rp->createBuffer( fView->fQuadPointInstances.count() * sizeof(QuadPointInstance), kVertex_GrBufferType, kDynamic_GrAccessPattern, -- cgit v1.2.3