Add store(PixelFormat,...) to mirror earlier load/gather.
Use store() in SkVMBlitter to let us to write to any format
supported by SkColorType_to_PixelFormat().
This means we can read and write all the same formats now. There's a
note on the SkColorType enum about some SkColorTypes being read-only,
but I've taken that to be descriptive and not proscriptive.
It's worth paying attention to grayscale. Gray PixelFormats hold the
same bit size and shift for each of r,g,b so load/gather just naturally
unpack the same value into each channel. When we want to store gray we
need to dot r,g,b together, here back into the red channel to
accommodate future gray-alpha.
Commit-Queue: Mike Klein <email@example.com>
Reviewed-by: Mike Reed <firstname.lastname@example.org>
3 files changed