skia2/samplecode
Michael Ludwig e6266a2d16 Handle arbitrary and degenerate quadrilaterals in GrQuadPerEdgeAA
Updates the handling of perspective quads to calculate the correct,
degenerate-safe projected quad and then derive from that the proper
perspective quad.

In 2D, updated to determine if the optimized outset/inset procedure
is valid, and if not goes through a more robust procedure that is
based on line equation intersections. In particular, the degenerate
inset/outset approach is used when the quad has a zero-length edge,
if insetting/outsetting normally would create a self-intersecting shape,
or if near parallel edge angles would create numerical instabilities.

Performance testing by forcing all rectangle draws through the degenerate
code path suggests that it is about 10% slower than the optimal approach,
at least on my workstation...

Bug: skia:
Change-Id: I2973da8d97949eacebb09a1b27c334d62c1c948e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/194008
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-03-11 20:04:03 +00:00
..
DecodeFile.h
PerlinPatch.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
Sample2PtRadial.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
Sample.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
Sample.h Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleAAClip.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleAAGeometry.cpp drawText Cleanup, part 4 2019-01-09 16:06:13 +00:00
SampleAARectModes.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleAARects.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleAndroidShadows.cpp Simplify perspective shadows to match future MD specs. 2018-08-31 18:15:19 +00:00
SampleAnimatedImage.cpp use font instead of paint for text 2019-01-02 17:45:30 +00:00
SampleAnimatedText.cpp Move GrContextPriv methods to their own .cpp file 2019-02-06 21:15:58 +00:00
SampleAnimBlur.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleArc.cpp change textutils to require font param 2019-01-03 21:11:52 +00:00
SampleAtlas.cpp drawText Cleanup, part 4 2019-01-09 16:06:13 +00:00
SampleBigBlur.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleBigGradient.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleBitmapRect.cpp use font instead of paint for text 2019-01-02 17:45:30 +00:00
SampleCamera.cpp IWYU: SkUtils.h 2018-08-21 16:05:44 +00:00
SampleCCPRGeometry.cpp Make mixed samples detection automatic 2019-03-05 21:27:15 +00:00
SampleChart.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleChineseFling.cpp Move GrContextPriv methods to their own .cpp file 2019-02-06 21:15:58 +00:00
SampleCircle.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleClamp.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleClip.cpp drawText Cleanup, part 4 2019-01-09 16:06:13 +00:00
SampleClipDrawMatch.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleClock.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleColorFilter.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleComplexClip.cpp use drawSimpleText 2019-01-03 18:27:23 +00:00
SampleConcavePaths.cpp IWYU: SkUtils.h 2018-08-21 16:05:44 +00:00
SampleCowboy.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleCusp.cpp use drawSimpleText 2019-01-03 18:27:23 +00:00
SampleDegenerateQuads.cpp Handle arbitrary and degenerate quadrilaterals in GrQuadPerEdgeAA 2019-03-11 20:04:03 +00:00
SampleDegenerateTwoPtRadials.cpp sed s/drawSimpleText/drawString/ 2019-01-08 19:50:09 +00:00
SampleEffects.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleEmboss.cpp IWYU: SkUtils.h 2018-08-21 16:05:44 +00:00
SampleFatBits.cpp drawText Cleanup, part 4 2019-01-09 16:06:13 +00:00
SampleFillType.cpp IWYU: SkUtils.h 2018-08-21 16:05:44 +00:00
SampleFilter2.cpp change textutils to require font param 2019-01-03 21:11:52 +00:00
SampleFilterQuality.cpp drawText Cleanup, part 4 2019-01-09 16:06:13 +00:00
SampleFlutterAnimate.cpp drawText Cleanup, part 4 2019-01-09 16:06:13 +00:00
SampleFontCache.cpp flag to convert to SkTextEncoding 2018-12-03 15:20:36 +00:00
SampleGlyphTransform.cpp use font instead of paint for text 2019-01-02 17:45:30 +00:00
SampleGradients.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleHairCurves.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleHairline.cpp IWYU: SkUtils.h 2018-08-21 16:05:44 +00:00
SampleHairModes.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleHT.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleIdentityScale.cpp drawText Cleanup, part 4 2019-01-09 16:06:13 +00:00
SampleLayerMask.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleLayers.cpp IWYU: SkUtils.h 2018-08-21 16:05:44 +00:00
SampleLCD.cpp use font instead of paint for text 2019-01-02 17:45:30 +00:00
SampleLighting.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleLines.cpp IWYU: SkUtils.h 2018-08-21 16:05:44 +00:00
SampleLitAtlas.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleLua.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleManyRects.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleMegaStroke.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleMixer.cpp rename mixer to lerp (in prep for SkMixer) 2019-03-11 19:32:31 +00:00
SampleNima.cpp Refactor Nima code 2018-10-30 19:32:52 +00:00
SamplePatch.cpp array of unique verts 2019-03-05 20:17:25 +00:00
SamplePath.cpp drawText Cleanup, part 4 2019-01-09 16:06:13 +00:00
SamplePathClip.cpp IWYU: SkUtils.h 2018-08-21 16:05:44 +00:00
SamplePathEffects.cpp IWYU: SkUtils.h 2018-08-21 16:05:44 +00:00
SamplePathFill.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SamplePathOverstroke.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SamplePathText.cpp remove breakText, and all utf cache accessors 2019-02-01 15:20:23 +00:00
SamplePdfFileViewer.cpp IWYU: SkUtils.h 2018-08-21 16:05:44 +00:00
SamplePoints.cpp IWYU: SkUtils.h 2018-08-21 16:05:44 +00:00
SamplePolyToPoly.cpp IWYU 2019-01-22 20:48:15 +00:00
SampleQuadStroker.cpp drawText Cleanup, part 4 2019-01-09 16:06:13 +00:00
SampleRectanizer.cpp sed s/drawSimpleText/drawString/ 2019-01-08 19:50:09 +00:00
SampleRegion.cpp IWYU 2019-01-22 20:48:15 +00:00
SampleRepeatTile.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleSG.cpp update sample-sg with hittesting 2019-02-12 20:50:52 +00:00
SampleShaders.cpp IWYU: SkUtils.h 2018-08-21 16:05:44 +00:00
SampleShadowColor.cpp drawText Cleanup, part 5 2019-01-09 16:10:30 +00:00
SampleShadowReference.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleShadowUtils.cpp IWYU: SkUtils.h 2018-08-21 16:05:44 +00:00
SampleShip.cpp sed s/drawSimpleText/drawString/ 2019-01-08 19:50:09 +00:00
SampleSlides.cpp delete textonpath code -- not used anywhere 2018-10-01 16:52:32 +00:00
SampleStringArt.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleStrokePath.cpp drawText Cleanup, part 4 2019-01-09 16:06:13 +00:00
SampleStrokeRect.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleSubpixelTranslate.cpp drawText Cleanup, part 4 2019-01-09 16:06:13 +00:00
SampleSVGFile.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleTextBox.cpp Make SkShaper an interface. 2019-02-19 22:06:47 +00:00
SampleTextEffects.cpp sed s/drawSimpleText/drawString/ 2019-01-08 19:50:09 +00:00
SampleTextureDomain.cpp Move Views into Sample and Viewer. 2018-08-09 15:25:32 +00:00
SampleThinAA.cpp Add new thin anti-aliasing demo 2019-01-31 14:55:52 +00:00
SampleTiling.cpp Revert "Hide setDrawLooper -- deprecate loopers" 2019-02-07 19:00:36 +00:00
SampleUnpremul.cpp Revert "Hide setDrawLooper -- deprecate loopers" 2019-02-07 19:00:36 +00:00
SampleVertices.cpp IWYU: SkUtils.h 2018-08-21 16:05:44 +00:00
SampleWritePixels.cpp IWYU: SkUtils.h 2018-08-21 16:05:44 +00:00
SampleXfer.cpp change textutils to require font param 2019-01-03 21:11:52 +00:00
SampleXfermodesBlur.cpp change textutils to require font param 2019-01-03 21:11:52 +00:00
vertexdump.cpp