Optimize reading from a JS array

Grants read-access to a JS array, either ...
- direct peek into the (malloc'd buffer)
- quick copy (the src was a typed_array)
- slow copy (had to perform a per-element lookup)

Change-Id: Id389f244039d35aefd84e0d95d598cbe15cd28c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409397
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Herb Derby <herb@google.com>
3 files changed