move colorshader into its own .cpp, add color4f variant

Implemented as a different subclass for SkColorShader (which is also private) partly to make the CL clearer/simpler, and partly for flatten/unflatten compatibility. Later I'm sure we could combine these if that proves useful.

Lots of TODOs at the moment, but still valuable to get reviewed.

Note: this ignores the question (for the moment) about how to interpret SkColor in the larger world. That needs to happen, but this CL is more focused on what *else* to do besides handle the old-style input (and old-style pipeline).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1934313002

Review-Url: https://codereview.chromium.org/1934313002
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index 0de53ad..60aa7cd 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -17,6 +17,7 @@
 #include "../gpu/GrColor.h"
 
 class SkColorFilter;
+class SkColorSpace;
 class SkPath;
 class SkPicture;
 class SkXfermode;
@@ -375,6 +376,14 @@
      */
     static sk_sp<SkShader> MakeColorShader(SkColor);
 
+    /**
+     *  Create a shader that draws the specified color (in the specified colorspace).
+     *
+     *  This works around the limitation that SkPaint::setColor() only takes byte values, and does
+     *  not support specific colorspaces.
+     */
+    static sk_sp<SkShader> MakeColorShader(const SkColor4f&, sk_sp<SkColorSpace>);
+
     static sk_sp<SkShader> MakeComposeShader(sk_sp<SkShader> dst, sk_sp<SkShader> src,
                                              SkXfermode::Mode);