4e9d5e2bdf
- most of the small diffs are because I moved GrWangsFormula.h out of the tessellate/ directory and into the geometry/ directory since it's more general than HW tessellation. The previous implementation was based on the heuristic that the distance from the true curve to the line segment would be divided by 4 every time the curve was recursively subdivided. This was a reasonable approximation if the curve had balanced curvature on both sides of the split. However, in the case of the new GM's curve, the left half was already very linear and the right half had much higher curves. This lead to the approximation reporting fewer points than required. Theoretically, those few points that weren't utilized by the left half of the curve could have been made available to the right half, but the implementation of that would be tricky. Instead, it now uses Wang's formula to compute the number of points. Since recursive subdivision leads to linearly spaced samples assuming it can't stop early, this point count represents a valid upper bound on what's needed. It also then ensures both left and right halves of a curve have the point counts they might need w/o updating the generation implementations. However, since the recursive point generation exits once each section has reached the error tolerance, in scenarios where the prior approximation was reasonable, we'll end up using fewer points than reported by Wang's. Hopefully that means there is negligible performance regression since we won't be increasing vertex counts by that much (except where needed for correctness). Bug: skia:11886 Change-Id: Iba39dbe4de82011775524583efd461b10c9259fe Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405197 Reviewed-by: Chris Dalton <csmartdalton@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Michael Ludwig <michaelludwig@google.com> |
||
---|---|---|
.. | ||
DecodeFile.h | ||
Sample2PtRadial.cpp | ||
Sample3D.cpp | ||
Sample.cpp | ||
Sample.h | ||
SampleAARectModes.cpp | ||
SampleAARects.cpp | ||
SampleAndroidShadows.cpp | ||
SampleAnimatedImage.cpp | ||
SampleAnimatedText.cpp | ||
SampleAnimBlur.cpp | ||
SampleArc.cpp | ||
SampleAtlas.cpp | ||
SampleAudio.cpp | ||
SampleCamera.cpp | ||
SampleChart.cpp | ||
SampleChineseFling.cpp | ||
SampleCircle.cpp | ||
SampleClip.cpp | ||
SampleClock.cpp | ||
SampleComplexClip.cpp | ||
SampleCowboy.cpp | ||
SampleCusp.cpp | ||
SampleDegenerateQuads.cpp | ||
SampleDegenerateTwoPtRadials.cpp | ||
SampleEffects.cpp | ||
SampleEmboss.cpp | ||
SampleFatBits.cpp | ||
SampleFillType.cpp | ||
SampleFilterBounds.cpp | ||
SampleFitCubicToCircle.cpp | ||
SampleFlutterAnimate.cpp | ||
SampleGlyphTransform.cpp | ||
SampleGradients.cpp | ||
SampleHairCurves.cpp | ||
SampleHairModes.cpp | ||
SampleImageFilterDAG.cpp | ||
SampleLayers.cpp | ||
SampleLCD.cpp | ||
SampleManyRects.cpp | ||
SampleMaterialShadows.cpp | ||
SampleMegaStroke.cpp | ||
SampleMixer.cpp | ||
SamplePatch.cpp | ||
SamplePath.cpp | ||
SamplePathClip.cpp | ||
SamplePathEffects.cpp | ||
SamplePathOverstroke.cpp | ||
SamplePathText.cpp | ||
SamplePolyToPoly.cpp | ||
SampleQuadStroker.cpp | ||
SampleRectanizer.cpp | ||
SampleRepeatTile.cpp | ||
SampleSG.cpp | ||
SampleShadowColor.cpp | ||
SampleShadowReference.cpp | ||
SampleShadowUtils.cpp | ||
SampleShip.cpp | ||
SampleSimpleStroker.cpp | ||
SampleSlides.cpp | ||
SampleStringArt.cpp | ||
SampleStrokePath.cpp | ||
SampleStrokeRect.cpp | ||
SampleStrokeVerb.cpp | ||
SampleSVGFile.cpp | ||
SampleTessellatedWedge.cpp | ||
SampleTextBox.cpp | ||
SampleTextEffects.cpp | ||
SampleTextureUpload.cpp | ||
SampleThinAA.cpp | ||
SampleTiming.cpp | ||
SampleVariableWidthStroker.cpp | ||
SampleVertices.cpp | ||
SampleWritePixels.cpp | ||
SampleXfer.cpp | ||
SampleXfermodesBlur.cpp | ||
vertexdump.cpp |