Add SkSerialProcs and SkDeserialProcs to Slug serialization
The shadertext3 gm started asserting when run in the glserializeslug
config after [1] landed. This was because the gm draws text with a
paint that has an image shader in it. During serialization, the
shader tried to serialize the (raster) SkImage and failed because
the default behavior of "use the PNG codec" was removed in [1].
This pipes in a way for the SkTestCanvas to supply that png codec
behavior for both serialization and deserialization (even though
it is a bit more ergonomic to simply register the decoder and
rely on the default behavior in practice).
This also makes SkSerialProcs required for SkWriteBuffer and
SkBinaryWriteBuffer since the default behavior for images is
nothing and should be specified if SkImages are being serialized.
[1] https://skia-review.googlesource.com/c/skia/+/752378
Bug: b/40045064
Change-Id: I26d3e069d4512d110afd25261ff0b07f2046aecd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/754856
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
33 files changed