skia2/include/effects
Mike Klein 024072af62 Reland "Improve degenerate 2pt conical gradient cases"
This reverts commit 95af4726bf.

Reason for revert: I think this may not have been the reason the Android roll was failing.  We've rolled, so it's a good time to try again.

Original change's description:
> Revert "Improve degenerate 2pt conical gradient cases"
> 
> This reverts commit 879dab87ab.
> 
> Reason for revert: Android roll failed.
> https://sponge.corp.google.com/target?id=93bc6b8d-9b42-4805-b204-46ae62f1b005&target=x86+CtsGraphicsTestCases&searchFor=&show=FAILED&sortBy=STATUS
> A test VectorDrawableTest.testVectorDrawableGradient fails.
> 
> Original change's description:
> > Improve degenerate 2pt conical gradient cases
> > 
> > This was originally a reland of "Fix div-by-zero loophole in gradient factory func", c34dd6c526, but:
> > 
> > The change caused blink layout tests when encountering very small or zero radii. The original patch switched the order of checking if the radii are equal and if the start radius was 0. In the case where both radii are 0, the original code created an actual radial gradient of radius 0 and the new code rejected the shader. A radial gradient with radius of 0 properly renders the last border color as a fill.
> > 
> > This made me realize that the case when the center positions and the radii are the same can be handled more correctly than just always returning an empty shader, so the fix now applies simplifications to the gradient definition depending on the tile mode and should not trigger any blink tests. I added a row to the gradient edge cases GM to make sure it degrades gracefully.
> > 
> > Original change's description:
> > > Fix div-by-zero loophole in gradient factory func
> > >
> > > Bug: oss-fuzz:10373
> > > Change-Id: I4277fb63e3186ee34feaf09ecf6aeddeb532f9c1
> > > Reviewed-on: https://skia-review.googlesource.com/c/168269
> > > Reviewed-by: Kevin Lubick <kjlubick@google.com>
> > > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > 
> > Docs-Preview: https://skia.org/?cl=168487
> > Bug: oss-fuzz:10373
> > Change-Id: Ib0a6e7f807560a5dcf24d1c8e0146817af2d9606
> > Reviewed-on: https://skia-review.googlesource.com/c/168487
> > Reviewed-by: Mike Reed <reed@google.com>
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> 
> TBR=caryclark@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,michaelludwig@google.com
> 
> Change-Id: I91b896c4a438c02206679b327a01b47f40993965
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: oss-fuzz:10373
> Reviewed-on: https://skia-review.googlesource.com/c/170272
> Reviewed-by: Stan Iliev <stani@google.com>
> Commit-Queue: Stan Iliev <stani@google.com>

TBR=caryclark@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,stani@google.com,michaelludwig@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: oss-fuzz:10373
Change-Id: I7577fcea9eb8a875e94723ab2cca2fcc990b82b2
Reviewed-on: https://skia-review.googlesource.com/c/170279
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-11 00:28:01 +00:00
..
Sk1DPathEffect.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
Sk2DPathEffect.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkAlphaThresholdFilter.h rename some flattenable routines 2018-10-20 14:08:32 +00:00
SkArithmeticImageFilter.h rename some flattenable routines 2018-10-20 14:08:32 +00:00
SkBlurDrawLooper.h
SkBlurImageFilter.h Fix some fuzzer bugs from Skia's image filter fuzzer 2018-01-23 19:54:00 +00:00
SkBlurMaskFilter.h Remove SK_SUPPORT_LEGACY_BLURMASKFILTER 2018-04-06 15:02:03 +00:00
SkColorFilterImageFilter.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkColorMatrix.h remove unimplemented headers 2018-07-20 16:19:47 +00:00
SkColorMatrixFilter.h
SkComposeImageFilter.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkCornerPathEffect.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkDashPathEffect.h [canvaskit] Add drawVertices API 2018-11-03 12:18:04 +00:00
SkDiscretePathEffect.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkDisplacementMapEffect.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkDropShadowImageFilter.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkGradientShader.h Reland "Improve degenerate 2pt conical gradient cases" 2018-11-11 00:28:01 +00:00
SkHighContrastFilter.h rename some flattenable routines 2018-10-20 14:08:32 +00:00
SkImageSource.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkLayerDrawLooper.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkLightingImageFilter.h rename some flattenable routines 2018-10-20 14:08:32 +00:00
SkLumaColorFilter.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkMagnifierImageFilter.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkMatrixConvolutionImageFilter.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkMergeImageFilter.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkMorphologyImageFilter.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkOffsetImageFilter.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkOpPathEffect.h rename to Merge patheffect 2018-07-19 18:15:16 +00:00
SkOverdrawColorFilter.h rename some flattenable routines 2018-10-20 14:08:32 +00:00
SkPaintImageFilter.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkPerlinNoiseShader.h rename some flattenable routines 2018-10-20 14:08:32 +00:00
SkPictureImageFilter.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkShaderMaskFilter.h rename some flattenable routines 2018-10-20 14:08:32 +00:00
SkTableColorFilter.h rename some flattenable routines 2018-10-20 14:08:32 +00:00
SkTableMaskFilter.h move the guts of SkMaskFilter.h into SkMaskFilterBase.h 2018-01-23 21:14:20 +00:00
SkTileImageFilter.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkToSRGBColorFilter.h override getTypeName() instead of using table 2018-10-19 18:07:04 +00:00
SkTrimPathEffect.h Extend SkTrimPathEffect semantics 2018-03-12 14:07:28 +00:00
SkXfermodeImageFilter.h rename some flattenable routines 2018-10-20 14:08:32 +00:00