Consistency among GrFP::ProgramImpl subclasses

Remove GL or GLSL from names of subclasses. Make nearly all subclasses
nested either in FP class or its onMakeProgramImpl() function.

Make onSetData private rather than protected.

Remove unused INHERITED typedefs.

Embrace idea that Impl is part of FP private implementation:
direct member access rather than getters and no GenKey pattern.

Other random consistency updates, modernatizations, stylistic changes.

Bug: skia:11358
Change-Id: I0d94e00a146abdd38e094ca550fc3b9608bd433d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438056
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp
index bdec6d0..edc5850 100644
--- a/src/gpu/GrFragmentProcessor.cpp
+++ b/src/gpu/GrFragmentProcessor.cpp
@@ -272,7 +272,6 @@
         }
 
         const char* name() const override { return "Swizzle"; }
-        const GrSwizzle& swizzle() const { return fSwizzle; }
 
         std::unique_ptr<GrFragmentProcessor> clone() const override {
             return Make(this->childProcessor(0)->clone(), fSwizzle);
@@ -286,20 +285,20 @@
         }
 
         std::unique_ptr<ProgramImpl> onMakeProgramImpl() const override {
-            class GLFP : public ProgramImpl {
+            class Impl : public ProgramImpl {
             public:
                 void emitCode(EmitArgs& args) override {
                     SkString childColor = this->invokeChild(0, args);
 
                     const SwizzleFragmentProcessor& sfp = args.fFp.cast<SwizzleFragmentProcessor>();
-                    const GrSwizzle& swizzle = sfp.swizzle();
+                    const GrSwizzle& swizzle = sfp.fSwizzle;
                     GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
 
                     fragBuilder->codeAppendf("return %s.%s;",
                                              childColor.c_str(), swizzle.asString().c_str());
                 }
             };
-            return std::make_unique<GLFP>();
+            return std::make_unique<Impl>();
         }
 
         void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
@@ -352,7 +351,7 @@
         }
 
         std::unique_ptr<ProgramImpl> onMakeProgramImpl() const override {
-            class GLFP : public ProgramImpl {
+            class Impl : public ProgramImpl {
             public:
                 void emitCode(EmitArgs& args) override {
                     GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
@@ -362,7 +361,7 @@
                     fragBuilder->codeAppendf("return color * %s.a;", args.fInputColor);
                 }
             };
-            return std::make_unique<GLFP>();
+            return std::make_unique<Impl>();
         }
 
         void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
@@ -471,7 +470,7 @@
 
     private:
         std::unique_ptr<ProgramImpl> onMakeProgramImpl() const override {
-            class GLFP : public ProgramImpl {
+            class Impl : public ProgramImpl {
             public:
                 void emitCode(EmitArgs& args) override {
                     SkString result = this->invokeChild(1, args);         // g(x)
@@ -479,7 +478,7 @@
                     args.fFragBuilder->codeAppendf("return %s;", result.c_str());
                 }
             };
-            return std::make_unique<GLFP>();
+            return std::make_unique<Impl>();
         }
 
         ComposeProcessor(std::unique_ptr<GrFragmentProcessor> f,
@@ -601,14 +600,14 @@
 
     private:
         std::unique_ptr<ProgramImpl> onMakeProgramImpl() const override {
-            class GLFP : public ProgramImpl {
+            class Impl : public ProgramImpl {
             public:
                 void emitCode(EmitArgs& args) override {
                     const char* dstColor = args.fFragBuilder->dstColor();
                     args.fFragBuilder->codeAppendf("return %s;", dstColor);
                 }
             };
-            return std::make_unique<GLFP>();
+            return std::make_unique<Impl>();
         }
 
         SurfaceColorProcessor()
@@ -902,7 +901,7 @@
         }
 
         std::unique_ptr<ProgramImpl> onMakeProgramImpl() const override {
-            class GLFP : public ProgramImpl {
+            class Impl : public ProgramImpl {
             public:
                 void emitCode(EmitArgs& args) override {
                     SkString childColor = this->invokeChild(0, args);
@@ -911,7 +910,7 @@
                     args.fFragBuilder->codeAppendf("return %s;", childColor.c_str());
                 }
             };
-            return std::make_unique<GLFP>();
+            return std::make_unique<Impl>();
         }
 
         void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}