Add a basic fuzzer for SkMeshSpecification::Make.

Mesh specifications have a lot of structure, and it's hard to make one
from truly random inputs. To give the fuzzer a fighting chance, the
input is interpreted as a stream of commands.

- Command 0: add a Attribute with properties (type, offset, name)
  taken from the next few bytes in the buffer. The name is restricted
  to legal ASCII.
- Command 1: add a Varying, behaves similarly to Attribute.
- Command 2: add the following data to the vertex program. High-ASCII
  bytes are converted to attribute names, varying names, SkSL
  keywords and operators in a predictable way. Stops when an
  unsupported control character is reached.
- Command 3: add the following data to the fragment program.
  Behaves similarly to vertex program. Stops when an
  unsupported control character is reached.

This structure was designed to be amenable to random incremental
change, so hopefully it gives the fuzzer a good playground to work in.

At this CL, we do not attempt to actually make a mesh or paint with
it, but this should give the fuzzer a good starting point.

I've manually converted the mesh specification from MeshGM into this
binary format and verified that the fuzzer decodes it correctly,
although the SkSL does not leverage the high-ASCII functionality:

http://go/paste/6095605729329152

Change-Id: Iaef7283fdab1c70b5e6e9c8fc925bef540874d90
Bug: skia:13765
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/588582
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
3 files changed