Add GrGpuBuffer MapType to describe map semantics.

Currently there are two values:
*Read - map for reading. effect of writes is undefined.
*WriteDiscard - discards previous contents before mapping for writing.

MapType is currently determined by GrGpuBufferType but is nonetheless
communicated to subclass via virtual onMap and onUnmap. Not all
backends actually actively discard with WriteDiscard for all types
of buffers.

Some internal map/unmap functions in GrGpuBuffer subclasses now take
ranges. This is in anticipation of adding an offset param to
updateData. Some backends that use mapping in onUpdateData will be
able to use a more optimal subrange. The exact meaning of the ranges depends on the backend API's mapping semantics (e.g. a range to map,
a range to flush from CPU to GPU, a range to complete gpu writes before
reading).

Bug: skia:13427
Change-Id: I470c70336eef1538855bd4951163fd74b06ea5f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553356
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
13 files changed