skia2/gn/samples.gni
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

107 lines
3.7 KiB
Plaintext

# Copyright 2016 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Things are easiest for everyone if these source paths are absolute.
_samplecode = get_path_info("../samplecode", "abspath")
samples_sources = [
"$_samplecode/PerlinPatch.cpp",
"$_samplecode/Sample.cpp",
"$_samplecode/Sample.h",
"$_samplecode/Sample2PtRadial.cpp",
"$_samplecode/SampleAAClip.cpp",
"$_samplecode/SampleAAGeometry.cpp",
"$_samplecode/SampleAARectModes.cpp",
"$_samplecode/SampleAARects.cpp",
"$_samplecode/SampleAndroidShadows.cpp",
"$_samplecode/SampleAnimatedImage.cpp",
"$_samplecode/SampleAnimatedText.cpp",
"$_samplecode/SampleAnimBlur.cpp",
"$_samplecode/SampleArc.cpp",
"$_samplecode/SampleAtlas.cpp",
"$_samplecode/SampleBigBlur.cpp",
"$_samplecode/SampleBigGradient.cpp",
"$_samplecode/SampleBitmapRect.cpp",
"$_samplecode/SampleCCPRGeometry.cpp",
"$_samplecode/SampleCamera.cpp",
"$_samplecode/SampleChart.cpp",
"$_samplecode/SampleChineseFling.cpp",
"$_samplecode/SampleCircle.cpp",
"$_samplecode/SampleClip.cpp",
"$_samplecode/SampleClipDrawMatch.cpp",
"$_samplecode/SampleClock.cpp",
"$_samplecode/SampleColorFilter.cpp",
"$_samplecode/SampleComplexClip.cpp",
"$_samplecode/SampleConcavePaths.cpp",
"$_samplecode/SampleCowboy.cpp",
"$_samplecode/SampleCusp.cpp",
"$_samplecode/SampleDegenerateQuads.cpp",
"$_samplecode/SampleDegenerateTwoPtRadials.cpp",
"$_samplecode/SampleEffects.cpp",
"$_samplecode/SampleEmboss.cpp",
"$_samplecode/SampleFatBits.cpp",
"$_samplecode/SampleFillType.cpp",
"$_samplecode/SampleFilter2.cpp",
"$_samplecode/SampleFilterQuality.cpp",
"$_samplecode/SampleFlutterAnimate.cpp",
"$_samplecode/SampleGlyphTransform.cpp",
"$_samplecode/SampleGradients.cpp",
"$_samplecode/SampleHairCurves.cpp",
"$_samplecode/SampleHairline.cpp",
"$_samplecode/SampleHairModes.cpp",
"$_samplecode/SampleHT.cpp",
"$_samplecode/SampleIdentityScale.cpp",
"$_samplecode/SampleLayerMask.cpp",
"$_samplecode/SampleLayers.cpp",
"$_samplecode/SampleLCD.cpp",
"$_samplecode/SampleLighting.cpp",
"$_samplecode/SampleLines.cpp",
"$_samplecode/SampleLitAtlas.cpp",
"$_samplecode/SampleManyRects.cpp",
"$_samplecode/SampleMegaStroke.cpp",
"$_samplecode/SampleNima.cpp",
"$_samplecode/SampleMixer.cpp",
"$_samplecode/SamplePatch.cpp",
"$_samplecode/SamplePath.cpp",
"$_samplecode/SamplePathText.cpp",
"$_samplecode/SamplePathClip.cpp",
"$_samplecode/SamplePathEffects.cpp",
"$_samplecode/SamplePathOverstroke.cpp",
"$_samplecode/SamplePdfFileViewer.cpp",
"$_samplecode/SamplePoints.cpp",
"$_samplecode/SamplePolyToPoly.cpp",
"$_samplecode/SampleQuadStroker.cpp",
"$_samplecode/SampleRectanizer.cpp",
"$_samplecode/SampleRegion.cpp",
"$_samplecode/SampleRepeatTile.cpp",
"$_samplecode/SampleSG.cpp",
"$_samplecode/SampleShaders.cpp",
"$_samplecode/SampleShadowColor.cpp",
"$_samplecode/SampleShadowReference.cpp",
"$_samplecode/SampleShadowUtils.cpp",
"$_samplecode/SampleShip.cpp",
"$_samplecode/SampleSlides.cpp",
"$_samplecode/SampleStringArt.cpp",
"$_samplecode/SampleStrokePath.cpp",
"$_samplecode/SampleStrokeRect.cpp",
"$_samplecode/SampleSubpixelTranslate.cpp",
"$_samplecode/SampleSVGFile.cpp",
"$_samplecode/SampleTextBox.cpp",
"$_samplecode/SampleTextEffects.cpp",
"$_samplecode/SampleTextureDomain.cpp",
"$_samplecode/SampleThinAA.cpp",
"$_samplecode/SampleTiling.cpp",
"$_samplecode/SampleUnpremul.cpp",
"$_samplecode/SampleVertices.cpp",
"$_samplecode/SampleWritePixels.cpp",
"$_samplecode/SampleXfer.cpp",
"$_samplecode/SampleXfermodesBlur.cpp",
"$_samplecode/vertexdump.cpp",
]
if (is_win && is_clang) {
samples_sources -= [ "$_samplecode/SampleNima.cpp" ]
}