Remove GrFragmentProcessor::computeInvariantOutput
Change-Id: If475730103052c6097eb91be06808fb723b70bf8
Reviewed-on: https://skia-review.googlesource.com/8330
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index 7de1008..8960449 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -361,7 +361,6 @@
#include "GrContext.h"
#include "GrFragmentProcessor.h"
-#include "GrInvariantOutput.h"
#include "GrTextureStripAtlas.h"
#include "SkGr.h"
#include "glsl/GrGLSLFragmentProcessor.h"
@@ -387,19 +386,13 @@
bool onIsEqual(const GrFragmentProcessor&) const override;
- void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
-
ColorTableEffect(GrTexture* texture, GrTextureStripAtlas* atlas, int row, unsigned flags);
GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
- TextureSampler fTextureSampler;
-
- // currently not used in shader code, just to assist onComputeInvariantOutput().
- unsigned fFlags;
-
- GrTextureStripAtlas* fAtlas;
- int fRow;
+ TextureSampler fTextureSampler;
+ GrTextureStripAtlas* fAtlas;
+ int fRow;
typedef GrFragmentProcessor INHERITED;
};
@@ -514,7 +507,6 @@
unsigned flags)
: INHERITED(kNone_OptimizationFlags) // Not bothering with table-specific optimizations.
, fTextureSampler(texture)
- , fFlags(flags)
, fAtlas(atlas)
, fRow(row) {
this->initClassID<ColorTableEffect>();
@@ -546,25 +538,6 @@
return fRow == that.fRow;
}
-void ColorTableEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
- // If we kept the table in the effect then we could actually run known inputs through the
- // table.
- GrColorComponentFlags invalidateFlags = kNone_GrColorComponentFlags;
- if (fFlags & SkTable_ColorFilter::kR_Flag) {
- invalidateFlags |= kR_GrColorComponentFlag;
- }
- if (fFlags & SkTable_ColorFilter::kG_Flag) {
- invalidateFlags |= kG_GrColorComponentFlag;
- }
- if (fFlags & SkTable_ColorFilter::kB_Flag) {
- invalidateFlags |= kB_GrColorComponentFlag;
- }
- if (fFlags & SkTable_ColorFilter::kA_Flag) {
- invalidateFlags |= kA_GrColorComponentFlag;
- }
- inout->invalidateComponents(invalidateFlags);
-}
-
///////////////////////////////////////////////////////////////////////////////
GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ColorTableEffect);