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/gpu/GrProcessorAnalysis.h b/src/gpu/GrProcessorAnalysis.h
index b7475db..6767941 100644
--- a/src/gpu/GrProcessorAnalysis.h
+++ b/src/gpu/GrProcessorAnalysis.h
@@ -124,7 +124,7 @@
*/
int initialProcessorsToEliminate(GrColor* newPipelineInputColor) const {
if (fProcessorsToEliminate > 0) {
- *newPipelineInputColor = GrColor4f::FromRGBA4f(fLastKnownOutputColor).toGrColor();
+ *newPipelineInputColor = fLastKnownOutputColor.toBytes_RGBA();
}
return fProcessorsToEliminate;
}
@@ -141,7 +141,7 @@
*/
GrProcessorAnalysisColor outputColor() const {
if (fKnowOutputColor) {
- return GrColor4f::FromRGBA4f(fLastKnownOutputColor).toGrColor();
+ return fLastKnownOutputColor.toBytes_RGBA();
}
return fIsOpaque ? GrProcessorAnalysisColor::Opaque::kYes
: GrProcessorAnalysisColor::Opaque::kNo;