skia2/include
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
..
android [infra] Experiment generating BUILD.bazel files 2021-11-23 18:53:16 +00:00
c [infra] Experiment generating BUILD.bazel files 2021-11-23 18:53:16 +00:00
codec HEIF decode: add support for 10-bit color format 2022-02-01 19:49:39 +00:00
config [infra] Experiment generating BUILD.bazel files 2021-11-23 18:53:16 +00:00
core [graphite] Add isGaneshBacked and isGraphiteBacked 2022-03-02 23:35:16 +00:00
docs [infra] Experiment generating BUILD.bazel files 2021-11-23 18:53:16 +00:00
effects Add SK_LENIENT_SKSL_DESERIALIZATION, enabled in Debugger 2022-03-04 20:58:47 +00:00
encode [infra] Experiment generating BUILD.bazel files 2021-11-23 18:53:16 +00:00
gpu Add ability to query gl format enum from GrBackendTexture. 2022-03-04 14:28:30 +00:00
pathops [infra] Experiment generating BUILD.bazel files 2021-11-23 18:53:16 +00:00
ports Convert 0 and NULL to nullptr. 2022-02-09 14:20:57 +00:00
private Use SkTHashMap for the MetalCodeGenerator. 2022-03-04 19:01:18 +00:00
sksl [canvaskit] Add skottie to Bazel build 2022-02-04 19:18:27 +00:00
svg [infra] Experiment generating BUILD.bazel files 2021-11-23 18:53:16 +00:00
third_party [infra] Experiment generating BUILD.bazel files 2021-11-23 18:53:16 +00:00
utils Remove canvas marker stack, marked matrices, etc... 2021-12-09 16:22:16 +00:00
OWNERS Add Bazel folks as owners to BUILD.bazel files 2021-11-09 14:24:54 +00:00