Add SkDynamicMemoryEndianWStream

There are several places (MPF, ICC, and Gainmap) where we write
big-endian values to a SkDynamicMemoryStream.

Unify all of these by adding a SkDynamicMemoryEndianWStream class
that provides writeU16BE, writeU32BE, and writeS32BE functions.

It may be that we should consider adding these functions to
SkWStream in the future.

Bug: b/338342146
Change-Id: Ic3dbe937a40673906882a94b041c72330faf9469
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/857856
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Christopher Cameron <ccameron@google.com>
Reviewed-by: Christopher Cameron <ccameron@google.com>
4 files changed