Clarify that buffers of type GrGpuBufferType::kXferGpuToCpu are mapped for reading.

Don't allow GrGpuBuffer::updateData on kXferGpuToCpu (in GL this can resize the buffer
to a smaller size).

Don't call glBufferData with NULL prior to mapping for reading.

Don't set GL_MAP_WRITE_BIT when using glMapBufferRange for reading only.

Bug: skia:8962
Change-Id: I605d83fa40c7b170082c48a456436d97cf3b70a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206707
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
5 files changed