[graphite] Refactor colortype/format optimization function TextureFormatXferFn.cpp

There are many more optimizations that can be applied inside the new
optimize_transfer function, but they need to be able to manipulate more
parameters (such as the swizzle and color space), and have control over
the final ops. Sometimes they also need to know the direction of the
transfer. This is a cosmetic change that sets up the function for
later expansion.

Bug: 509890794
Change-Id: I3b26c6b73b6d92faa0d1a2078e2d07d3276ae3ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1342696
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Thomas Smith <thomsmit@google.com>
1 file changed