0817ce7c5b
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> |
||
---|---|---|
.. | ||
BUILD.bazel | ||
Sk1DPathEffect.h | ||
Sk2DPathEffect.h | ||
SkBlenders.h | ||
SkBlurDrawLooper.h | ||
SkBlurMaskFilter.h | ||
SkColorMatrix.h | ||
SkColorMatrixFilter.h | ||
SkCornerPathEffect.h | ||
SkDashPathEffect.h | ||
SkDiscretePathEffect.h | ||
SkGradientShader.h | ||
SkHighContrastFilter.h | ||
SkImageFilters.h | ||
SkLayerDrawLooper.h | ||
SkLumaColorFilter.h | ||
SkOpPathEffect.h | ||
SkOverdrawColorFilter.h | ||
SkPerlinNoiseShader.h | ||
SkRuntimeEffect.h | ||
SkShaderMaskFilter.h | ||
SkStrokeAndFillPathEffect.h | ||
SkTableColorFilter.h | ||
SkTableMaskFilter.h | ||
SkTrimPathEffect.h |