From 7ca3b7bbe31545a78ff3a7aee8cb58b95eba587b Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Tue, 10 Apr 2018 00:21:19 -0600 Subject: ccpr: Remove fCurrAnchorPoint from GrCCGeometry Removes fCurrAnchorPoint, and various other cleanups. fCurrAnchorPoint was originally added because points were expected to be written directly to mapped GPU buffers, which is not going to happen anymore. Bug: skia: Change-Id: Icaf8d09dae218f58c19a2f368f3cd281e285e2dd Reviewed-on: https://skia-review.googlesource.com/119984 Reviewed-by: Brian Salomon Commit-Queue: Chris Dalton --- samplecode/SampleCCPRGeometry.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'samplecode') diff --git a/samplecode/SampleCCPRGeometry.cpp b/samplecode/SampleCCPRGeometry.cpp index 7ddf91f0ae..a6e408749a 100644 --- a/samplecode/SampleCCPRGeometry.cpp +++ b/samplecode/SampleCCPRGeometry.cpp @@ -245,7 +245,7 @@ void CCPRGeometryView::updateGpuData() { fCubicType = GrPathUtils::getCubicKLM(fPoints, &fCubicKLM, t, s); GrCCGeometry geometry; geometry.beginContour(fPoints[0]); - geometry.cubicTo(fPoints[1], fPoints[2], fPoints[3], kDebugBloat / 2, kDebugBloat / 2); + geometry.cubicTo(fPoints, kDebugBloat / 2, kDebugBloat / 2); geometry.endContour(); int ptsIdx = 0; for (GrCCGeometry::Verb verb : geometry.verbs()) { @@ -265,9 +265,10 @@ void CCPRGeometryView::updateGpuData() { } } } else if (PrimitiveType::kQuadratics == fPrimitiveType) { + SkPoint P3[3] = {fPoints[0], fPoints[1], fPoints[3]}; GrCCGeometry geometry; - geometry.beginContour(fPoints[0]); - geometry.quadraticTo(fPoints[1], fPoints[3]); + geometry.beginContour(P3[0]); + geometry.quadraticTo(P3); geometry.endContour(); int ptsIdx = 0; for (GrCCGeometry::Verb verb : geometry.verbs()) { -- cgit v1.2.3