Revert "Start of rewrite of GrFragmentProcessor optimizations."

This reverts commit 85eb4226a4cd8c10a0e3f3ba2f3a60efbb2dd61b.

Reason for revert: test failures on Windows, e.g. https://chromium-swarm.appspot.com/task?id=33f9527484414110&refresh=10

Original change's description:
> Start of rewrite of GrFragmentProcessor optimizations.
> 
> This adds a replacement for computeInvariantOutput buts does not use it yet. The replacement allows for three types of optimizations:
> 
> * known input color -> known output color for GrFP elimination
> * tracking of whether all color processors modulate their input for the "tweak alpha" optimziation
> * opaqueness tracking
> 
> This loses some of the generality of computInvariantOutput. It does not track the known output status of individual color components (other than opaque alpha). It does not track whether GrFragmentProcessors read their input color. It doesn't allow a processor that will receive non-constant output to advertise that it produces a constant output. These could probably be added back in the unlikely case that they prove valuable.
> 
> Unlike computeInvariantOutput the optimizations are decided at instantiation time and constant colors are expressed as GrColor4f rather than GrColor.
> 
> Change-Id: I684d3f9050693dde2d28154fa695e049ed8cf61a
> Reviewed-on: https://skia-review.googlesource.com/7481
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> 

TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I2390df257456013fa74137cb5d7b5a93820c291e
Reviewed-on: https://skia-review.googlesource.com/7652
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/gpu/effects/GrSingleTextureEffect.cpp b/src/gpu/effects/GrSingleTextureEffect.cpp
index acfc0d1..c493920 100644
--- a/src/gpu/effects/GrSingleTextureEffect.cpp
+++ b/src/gpu/effects/GrSingleTextureEffect.cpp
@@ -12,73 +12,67 @@
 
 GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
                                              sk_sp<GrColorSpaceXform> colorSpaceXform,
-                                             const SkMatrix& m, OptimizationFlags optFlags)
-        : INHERITED(optFlags)
-        , fCoordTransform(m, texture, GrSamplerParams::kNone_FilterMode)
-        , fTextureSampler(texture)
-        , fColorSpaceXform(std::move(colorSpaceXform)) {
-    this->addCoordTransform(&fCoordTransform);
-    this->addTextureSampler(&fTextureSampler);
-}
-
-GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
-                                             sk_sp<GrColorSpaceXform> colorSpaceXform,
-                                             const SkMatrix& m,
-                                             GrSamplerParams::FilterMode filterMode,
-                                             OptimizationFlags optFlags)
-        : INHERITED(optFlags)
-        , fCoordTransform(m, texture, filterMode)
-        , fTextureSampler(texture, filterMode)
-        , fColorSpaceXform(std::move(colorSpaceXform)) {
-    this->addCoordTransform(&fCoordTransform);
-    this->addTextureSampler(&fTextureSampler);
-}
-
-GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
-                                             sk_sp<GrColorSpaceXform> colorSpaceXform,
-                                             const SkMatrix& m, const GrSamplerParams& params,
-                                             OptimizationFlags optFlags)
-        : INHERITED(optFlags)
-        , fCoordTransform(m, texture, params.filterMode())
-        , fTextureSampler(texture, params)
-        , fColorSpaceXform(std::move(colorSpaceXform)) {
-    this->addCoordTransform(&fCoordTransform);
-    this->addTextureSampler(&fTextureSampler);
-}
-
-GrSingleTextureEffect::GrSingleTextureEffect(GrContext* ctx, OptimizationFlags optFlags,
-                                             sk_sp<GrTextureProxy> proxy,
-                                             sk_sp<GrColorSpaceXform> colorSpaceXform,
                                              const SkMatrix& m)
-        : INHERITED(optFlags)
-        , fCoordTransform(ctx, m, proxy.get(), GrSamplerParams::kNone_FilterMode)
-        , fTextureSampler(ctx->textureProvider(), std::move(proxy))
-        , fColorSpaceXform(std::move(colorSpaceXform)) {
+    : fCoordTransform(m, texture, GrSamplerParams::kNone_FilterMode)
+    , fTextureSampler(texture)
+    , fColorSpaceXform(std::move(colorSpaceXform)) {
     this->addCoordTransform(&fCoordTransform);
     this->addTextureSampler(&fTextureSampler);
 }
 
-GrSingleTextureEffect::GrSingleTextureEffect(GrContext* ctx, OptimizationFlags optFlags,
-                                             sk_sp<GrTextureProxy> proxy,
+GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
                                              sk_sp<GrColorSpaceXform> colorSpaceXform,
                                              const SkMatrix& m,
                                              GrSamplerParams::FilterMode filterMode)
-        : INHERITED(optFlags)
-        , fCoordTransform(ctx, m, proxy.get(), filterMode)
-        , fTextureSampler(ctx->textureProvider(), std::move(proxy), filterMode)
-        , fColorSpaceXform(std::move(colorSpaceXform)) {
+    : fCoordTransform(m, texture, filterMode)
+    , fTextureSampler(texture, filterMode)
+    , fColorSpaceXform(std::move(colorSpaceXform)) {
     this->addCoordTransform(&fCoordTransform);
     this->addTextureSampler(&fTextureSampler);
 }
 
-GrSingleTextureEffect::GrSingleTextureEffect(GrContext* ctx, OptimizationFlags optFlags,
-                                             sk_sp<GrTextureProxy> proxy,
+GrSingleTextureEffect::GrSingleTextureEffect(GrTexture* texture,
                                              sk_sp<GrColorSpaceXform> colorSpaceXform,
-                                             const SkMatrix& m, const GrSamplerParams& params)
-        : INHERITED(optFlags)
-        , fCoordTransform(ctx, m, proxy.get(), params.filterMode())
-        , fTextureSampler(ctx->textureProvider(), std::move(proxy), params)
-        , fColorSpaceXform(std::move(colorSpaceXform)) {
+                                             const SkMatrix& m,
+                                             const GrSamplerParams& params)
+    : fCoordTransform(m, texture, params.filterMode())
+    , fTextureSampler(texture, params)
+    , fColorSpaceXform(std::move(colorSpaceXform)) {
     this->addCoordTransform(&fCoordTransform);
     this->addTextureSampler(&fTextureSampler);
 }
+
+GrSingleTextureEffect::GrSingleTextureEffect(GrContext* ctx, sk_sp<GrTextureProxy> proxy,
+                                             sk_sp<GrColorSpaceXform> colorSpaceXform,
+                                             const SkMatrix& m)
+    : fCoordTransform(ctx, m, proxy.get(), GrSamplerParams::kNone_FilterMode)
+    , fTextureSampler(ctx->textureProvider(), std::move(proxy))
+    , fColorSpaceXform(std::move(colorSpaceXform)) {
+    this->addCoordTransform(&fCoordTransform);
+    this->addTextureSampler(&fTextureSampler);
+}
+
+GrSingleTextureEffect::GrSingleTextureEffect(GrContext* ctx, sk_sp<GrTextureProxy> proxy,
+                                             sk_sp<GrColorSpaceXform> colorSpaceXform,
+                                             const SkMatrix& m,
+                                             GrSamplerParams::FilterMode filterMode)
+    : fCoordTransform(ctx, m, proxy.get(), filterMode)
+    , fTextureSampler(ctx->textureProvider(), std::move(proxy), filterMode)
+    , fColorSpaceXform(std::move(colorSpaceXform)) {
+    this->addCoordTransform(&fCoordTransform);
+    this->addTextureSampler(&fTextureSampler);
+}
+
+GrSingleTextureEffect::GrSingleTextureEffect(GrContext* ctx, sk_sp<GrTextureProxy> proxy,
+                                             sk_sp<GrColorSpaceXform> colorSpaceXform,
+                                             const SkMatrix& m,
+                                             const GrSamplerParams& params)
+    : fCoordTransform(ctx, m, proxy.get(), params.filterMode())
+    , fTextureSampler(ctx->textureProvider(), std::move(proxy), params)
+    , fColorSpaceXform(std::move(colorSpaceXform)) {
+    this->addCoordTransform(&fCoordTransform);
+    this->addTextureSampler(&fTextureSampler);
+}
+
+GrSingleTextureEffect::~GrSingleTextureEffect() {
+}