Remove all remaining GrColor4f (other than gradients)
This adds SkPMColor4f conversions to/from RGBA bytes (ie GrColor).
I had previously made some free functions that did the same thing.
I'm ambivalent about which option is nicer, but wanted to have one
method, so I converted everything to use the new versions.
Bug: skia:
Change-Id: I4194c44b5bd12228075fd1932a14cf31c8d6a3c1
Reviewed-on: https://skia-review.googlesource.com/c/162560
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/src/atlastext/SkAtlasTextTarget.cpp b/src/atlastext/SkAtlasTextTarget.cpp
index 2a59790..fcb489e 100644
--- a/src/atlastext/SkAtlasTextTarget.cpp
+++ b/src/atlastext/SkAtlasTextTarget.cpp
@@ -105,7 +105,7 @@
void makeGrPaint(GrMaskFormat, const SkPaint& skPaint, const SkMatrix&,
GrPaint* grPaint) override {
- grPaint->setColor4f(GrColor4f::FromRGBA4f(skPaint.getColor4f().premul()));
+ grPaint->setColor4f(skPaint.getColor4f().premul());
}
GrContext* getContext() override {