skia2/include/effects
Brian Osman 0817ce7c5b Add SK_LENIENT_SKSL_DESERIALIZATION, enabled in Debugger
When deserializing an SkSL shader, it's possible to encounter code that
doesn't compile (particularly from the last year, when syntax tweaks
were being made). By default, we still treat this as an error and fail
to load the SKP. In the SKP debugger, though, we add a lenient mode that
permits these failures. If any of the children were SkShaders, we
instead return that. If all else fails, we just return nullptr, which
will cause the triggering draw to use a solid paint-color, but at least
allow the SKP to be loaded and viewed.

For color-filters and blenders, we allow malformed SkSL, but always
return nullptr.

The bug that prompted this change involved Android's overscroll stretch
shader, where this approach works particularly well (it turns the
stretch into a simple pass-through of the underlying content).

Change-Id: I756c694739d31b11efa1b82c126f34440a7de66a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/515543
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-03-04 20:58:47 +00:00
..
BUILD.bazel [bazel] Make use of test_on_env to spin up server for gms 2022-02-28 14:05:54 +00:00
Sk1DPathEffect.h Just expose factories for patheffects 2021-05-20 23:01:45 +00:00
Sk2DPathEffect.h Just expose factories for patheffects 2021-05-20 23:01:45 +00:00
SkBlenders.h Arithmetic blender 2021-07-08 17:06:17 +00:00
SkBlurDrawLooper.h Hide (unused) SkDrawLooper 2021-02-07 12:49:53 +00:00
SkBlurMaskFilter.h
SkColorMatrix.h Add SkColorMatrix factories for SkYUVColorSpace 2021-10-20 16:47:03 +00:00
SkColorMatrixFilter.h
SkCornerPathEffect.h Move class into impl 2021-05-21 18:06:53 +00:00
SkDashPathEffect.h
SkDiscretePathEffect.h Move patheffect details to (private) base subclass 2021-05-22 01:55:43 +00:00
SkGradientShader.h Add fiddle example for MakeLinear 2020-03-18 17:53:11 +00:00
SkHighContrastFilter.h clean up SK_SUPPORT_LEGACY_RUNTIME_EFFECTS 2021-02-13 22:01:14 +00:00
SkImageFilters.h Add support for multiple child nodes to SkImageFilters::RuntimeShader 2022-01-05 20:07:00 +00:00
SkLayerDrawLooper.h Reenable Wdeprecated-copy-dtor 2021-02-16 17:53:28 +00:00
SkLumaColorFilter.h clean up SK_SUPPORT_LEGACY_RUNTIME_EFFECTS 2021-02-13 22:01:14 +00:00
SkOpPathEffect.h Move patheffect details to (private) base subclass 2021-05-22 01:55:43 +00:00
SkOverdrawColorFilter.h change Overdraw colorfilter to be pure sksl 2020-04-16 19:15:01 +00:00
SkPerlinNoiseShader.h Remove Improved Perlin Noise 2021-01-11 15:27:26 +00:00
SkRuntimeEffect.h Add SK_LENIENT_SKSL_DESERIALIZATION, enabled in Debugger 2022-03-04 20:58:47 +00:00
SkShaderMaskFilter.h
SkStrokeAndFillPathEffect.h add new patheffect for stroke-and-fill 2020-05-20 15:01:26 +00:00
SkTableColorFilter.h
SkTableMaskFilter.h
SkTrimPathEffect.h [SkTrimPathEffect] Preserve wrap-around continuity 2020-04-07 14:40:17 +00:00