Remove GLSL from name of functions that builds GrProcessor keys.
Bug: skia:11358
Change-Id: Ie70e45b18c12126c8e86700ad1040bc319be385a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436998
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
diff --git a/bench/VertexColorSpaceBench.cpp b/bench/VertexColorSpaceBench.cpp
index 23f7a1e..6d34003 100644
--- a/bench/VertexColorSpaceBench.cpp
+++ b/bench/VertexColorSpaceBench.cpp
@@ -92,7 +92,7 @@
return new GLSLGP();
}
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
b->add32(fMode);
b->add32(GrColorSpaceXform::XformKey(fColorSpaceXform.get()));
}
diff --git a/gm/clockwise.cpp b/gm/clockwise.cpp
index ba94343..fd47cf8 100644
--- a/gm/clockwise.cpp
+++ b/gm/clockwise.cpp
@@ -73,7 +73,7 @@
const char* name() const final { return "ClockwiseTestProcessor"; }
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const final {
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const final {
b->add32(fReadSkFragCoord);
}
diff --git a/gm/destcolor.cpp b/gm/destcolor.cpp
index 8a7779b..1bbc9a8 100644
--- a/gm/destcolor.cpp
+++ b/gm/destcolor.cpp
@@ -47,7 +47,7 @@
}
const char* name() const override { return "DestColorTestFP"; }
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
class Impl : public GrGLSLFragmentProcessor {
diff --git a/gm/dsl_processor_test.cpp b/gm/dsl_processor_test.cpp
index e384e00..fab1f0b 100644
--- a/gm/dsl_processor_test.cpp
+++ b/gm/dsl_processor_test.cpp
@@ -22,7 +22,7 @@
}
const char* name() const override { return "DSLEffect"; }
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor& that) const override { return this == &that; }
std::unique_ptr<GrFragmentProcessor> clone() const override { return nullptr; }
diff --git a/gm/fp_sample_chaining.cpp b/gm/fp_sample_chaining.cpp
index 10e5cdf..22cda9b 100644
--- a/gm/fp_sample_chaining.cpp
+++ b/gm/fp_sample_chaining.cpp
@@ -32,7 +32,7 @@
}
const char* name() const override { return "UniformMatrixEffect"; }
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor& that) const override { return this == &that; }
std::unique_ptr<GrFragmentProcessor> clone() const override { return nullptr; }
@@ -70,7 +70,7 @@
}
const char* name() const override { return "ExplicitCoordEffect"; }
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor& that) const override { return this == &that; }
std::unique_ptr<GrFragmentProcessor> clone() const override { return nullptr; }
@@ -97,7 +97,7 @@
}
const char* name() const override { return "TestPatternEffect"; }
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor& that) const override { return this == &that; }
std::unique_ptr<GrFragmentProcessor> clone() const override { return nullptr; }
diff --git a/gm/fpcoordinateoverride.cpp b/gm/fpcoordinateoverride.cpp
index fc9adfe..62cdc80 100644
--- a/gm/fpcoordinateoverride.cpp
+++ b/gm/fpcoordinateoverride.cpp
@@ -46,8 +46,7 @@
return nullptr;
}
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {
- }
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor&) const override {
SkASSERT(false);
diff --git a/gm/fwidth_squircle.cpp b/gm/fwidth_squircle.cpp
index d18995e..8a1d1db 100644
--- a/gm/fwidth_squircle.cpp
+++ b/gm/fwidth_squircle.cpp
@@ -70,7 +70,7 @@
const char* name() const override { return "FwidthSquircleTestProcessor"; }
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const final {}
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const final;
diff --git a/gm/tessellation.cpp b/gm/tessellation.cpp
index 9ef497d..1458fe8 100644
--- a/gm/tessellation.cpp
+++ b/gm/tessellation.cpp
@@ -62,7 +62,7 @@
private:
const char* name() const final { return "TessellationTestTriShader"; }
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const final {}
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
class Impl : public GrGLSLGeometryProcessor {
void onEmitCode(EmitArgs& args, GrGPArgs*) override {
@@ -173,7 +173,7 @@
private:
const char* name() const final { return "TessellationTestRectShader"; }
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const final {}
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
class Impl : public GrGLSLGeometryProcessor {
void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override {
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index b222373..c94681b 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -131,7 +131,7 @@
private:
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
diff --git a/src/effects/imagefilters/SkDisplacementMapImageFilter.cpp b/src/effects/imagefilters/SkDisplacementMapImageFilter.cpp
index a096425..4358af7 100644
--- a/src/effects/imagefilters/SkDisplacementMapImageFilter.cpp
+++ b/src/effects/imagefilters/SkDisplacementMapImageFilter.cpp
@@ -179,7 +179,7 @@
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
- void onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
@@ -457,8 +457,7 @@
return std::make_unique<Impl>();
}
-void GrDisplacementMapEffect::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrDisplacementMapEffect::onAddToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
Impl::GenKey(*this, caps, b);
}
diff --git a/src/effects/imagefilters/SkLightingImageFilter.cpp b/src/effects/imagefilters/SkLightingImageFilter.cpp
index 01e96b9..2902c3d 100644
--- a/src/effects/imagefilters/SkLightingImageFilter.cpp
+++ b/src/effects/imagefilters/SkLightingImageFilter.cpp
@@ -666,7 +666,7 @@
private:
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
@@ -715,7 +715,7 @@
SkScalar shininess() const { return fShininess; }
private:
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
@@ -1677,8 +1677,7 @@
return INHERITED::onIsEqual(sBase) && this->kd() == s.kd();
}
-void GrDiffuseLightingEffect::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrDiffuseLightingEffect::onAddToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
GrGLDiffuseLightingEffect::GenKey(*this, caps, b);
}
@@ -1902,8 +1901,8 @@
this->shininess() == s.shininess();
}
-void GrSpecularLightingEffect::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrSpecularLightingEffect::onAddToKey(const GrShaderCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLSpecularLightingEffect::GenKey(*this, caps, b);
}
diff --git a/src/effects/imagefilters/SkMorphologyImageFilter.cpp b/src/effects/imagefilters/SkMorphologyImageFilter.cpp
index 4e2d862..74afe25 100644
--- a/src/effects/imagefilters/SkMorphologyImageFilter.cpp
+++ b/src/effects/imagefilters/SkMorphologyImageFilter.cpp
@@ -207,7 +207,7 @@
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
GrMorphologyEffect(std::unique_ptr<GrFragmentProcessor> inputFP, GrSurfaceProxyView,
@@ -286,8 +286,7 @@
return std::make_unique<Impl>();
}
-void GrMorphologyEffect::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrMorphologyEffect::onAddToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
uint32_t key = static_cast<uint32_t>(fRadius);
key |= (static_cast<uint32_t>(fType) << 8);
key |= (static_cast<uint32_t>(fDirection) << 9);
diff --git a/src/gpu/GrColorSpaceXform.cpp b/src/gpu/GrColorSpaceXform.cpp
index 1acba25..8ad15fc 100644
--- a/src/gpu/GrColorSpaceXform.cpp
+++ b/src/gpu/GrColorSpaceXform.cpp
@@ -115,8 +115,7 @@
return GrColorSpaceXform::Equals(fColorXform.get(), other.fColorXform.get());
}
-void GrColorSpaceXformEffect::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrColorSpaceXformEffect::onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const {
b->add32(GrColorSpaceXform::XformKey(fColorXform.get()));
}
diff --git a/src/gpu/GrColorSpaceXform.h b/src/gpu/GrColorSpaceXform.h
index 0dbc51e..3304fe4 100644
--- a/src/gpu/GrColorSpaceXform.h
+++ b/src/gpu/GrColorSpaceXform.h
@@ -96,7 +96,7 @@
SkPMColor4f constantOutputForConstantInput(const SkPMColor4f& input) const override;
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
sk_sp<GrColorSpaceXform> fColorXform;
diff --git a/src/gpu/GrDefaultGeoProcFactory.cpp b/src/gpu/GrDefaultGeoProcFactory.cpp
index d27192f..2b36c8b 100644
--- a/src/gpu/GrDefaultGeoProcFactory.cpp
+++ b/src/gpu/GrDefaultGeoProcFactory.cpp
@@ -209,7 +209,7 @@
using INHERITED = GrGLSLGeometryProcessor;
};
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
+ void addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
GLSLProcessor::GenKey(*this, caps, b);
}
diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp
index 342517a..dc1357b 100644
--- a/src/gpu/GrFragmentProcessor.cpp
+++ b/src/gpu/GrFragmentProcessor.cpp
@@ -303,7 +303,7 @@
return std::make_unique<GLFP>();
}
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
b->add32(fSwizzle.asKey());
}
@@ -366,7 +366,7 @@
return std::make_unique<GLFP>();
}
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
@@ -496,7 +496,7 @@
this->cloneAndRegisterAllChildProcessors(that);
}
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
@@ -620,7 +620,7 @@
this->setWillReadDstColor();
}
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
@@ -672,7 +672,7 @@
return std::make_unique<Impl>();
}
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor& processor) const override { return true; }
@@ -918,7 +918,7 @@
return std::make_unique<GLFP>();
}
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {}
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor& other) const override { return true; }
SkPMColor4f constantOutputForConstantInput(const SkPMColor4f& input) const override {
diff --git a/src/gpu/GrFragmentProcessor.h b/src/gpu/GrFragmentProcessor.h
index 94de462..f7a48d3 100644
--- a/src/gpu/GrFragmentProcessor.h
+++ b/src/gpu/GrFragmentProcessor.h
@@ -197,11 +197,11 @@
std::unique_ptr<GrGLSLFragmentProcessor> makeProgramImpl() const;
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
- this->onGetGLSLProcessorKey(caps, b);
+ void addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
+ this->onAddToKey(caps, b);
for (const auto& child : fChildProcessors) {
if (child) {
- child->getGLSLProcessorKey(caps, b);
+ child->addToKey(caps, b);
}
}
}
@@ -295,7 +295,7 @@
from getFactory()).
A return value of true from isEqual() should not be used to test whether the processor would
- generate the same shader code. To test for identical code generation use getGLSLProcessorKey
+ generate the same shader code. To test for identical code generation use addToKey.
*/
bool isEqual(const GrFragmentProcessor& that) const;
@@ -438,8 +438,7 @@
the object. */
virtual std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const = 0;
- /** Implemented using GLFragmentProcessor::GenKey as described in this class's comment. */
- virtual void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const = 0;
+ virtual void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const = 0;
/**
* Subclass implements this to support isEqual(). It will only be called if it is known that
diff --git a/src/gpu/GrGeometryProcessor.h b/src/gpu/GrGeometryProcessor.h
index 73c7627..e823f0e 100644
--- a/src/gpu/GrGeometryProcessor.h
+++ b/src/gpu/GrGeometryProcessor.h
@@ -185,13 +185,10 @@
static constexpr int kCoordTransformKeyBits = 4;
/**
- * Sets a unique key on the GrProcessorKeyBuilder that is directly associated with this geometry
- * processor's GL backend implementation.
- *
- * TODO: A better name for this function would be "compute" instead of "get".
+ * Adds a key on the GrProcessorKeyBuilder that reflects any variety in the code that the
+ * geometry processor subclass can emit.
*/
- virtual void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const = 0;
-
+ virtual void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const = 0;
void getAttributeKey(GrProcessorKeyBuilder* b) const {
// Ensure that our CPU and GPU type fields fit together in a 32-bit value, and we never
diff --git a/src/gpu/GrProgramDesc.cpp b/src/gpu/GrProgramDesc.cpp
index 528fe63..a8ebd02 100644
--- a/src/gpu/GrProgramDesc.cpp
+++ b/src/gpu/GrProgramDesc.cpp
@@ -76,7 +76,7 @@
/**
* Functions which emit processor key info into the key builder.
* For every effect, we include the effect's class ID (different for every GrProcessor subclass),
- * any information generated by the effect itself (getGLSLProcessorKey), and some meta-information.
+ * any information generated by the effect itself (addToKey), and some meta-information.
* Shader code may be dependent on properties of the effect not placed in the key by the effect
* (e.g. pixel format of textures used).
*/
@@ -86,7 +86,7 @@
b->appendComment(geomProc.name());
b->addBits(kClassIDBits, geomProc.classID(), "geomProcClassID");
- geomProc.getGLSLProcessorKey(*caps.shaderCaps(), b);
+ geomProc.addToKey(*caps.shaderCaps(), b);
geomProc.getAttributeKey(b);
add_geomproc_sampler_keys(b, geomProc, caps);
@@ -106,8 +106,10 @@
originIfDstTexture = &origin;
}
- xp.getGLSLProcessorKey(*caps.shaderCaps(), b, originIfDstTexture,
- pipeline.dstSampleFlags() & GrDstSampleFlags::kAsInputAttachment);
+ xp.addToKey(*caps.shaderCaps(),
+ b,
+ originIfDstTexture,
+ pipeline.dstSampleFlags() & GrDstSampleFlags::kAsInputAttachment);
}
static void gen_fp_key(const GrFragmentProcessor& fp,
@@ -125,7 +127,7 @@
caps.addExtraSamplerKey(b, te->samplerState(), backendFormat);
}
- fp.getGLSLProcessorKey(*caps.shaderCaps(), b);
+ fp.addToKey(*caps.shaderCaps(), b);
b->add32(fp.numChildProcessors(), "fpNumChildren");
for (int i = 0; i < fp.numChildProcessors(); ++i) {
diff --git a/src/gpu/GrXferProcessor.cpp b/src/gpu/GrXferProcessor.cpp
index 1d74e12..d6574f7 100644
--- a/src/gpu/GrXferProcessor.cpp
+++ b/src/gpu/GrXferProcessor.cpp
@@ -28,9 +28,10 @@
return false;
}
-void GrXferProcessor::getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b,
- const GrSurfaceOrigin* originIfDstTexture,
- bool usesInputAttachmentForDstRead) const {
+void GrXferProcessor::addToKey(const GrShaderCaps& caps,
+ GrProcessorKeyBuilder* b,
+ const GrSurfaceOrigin* originIfDstTexture,
+ bool usesInputAttachmentForDstRead) const {
uint32_t key = this->willReadDstColor() ? 0x1 : 0x0;
if (key) {
if (originIfDstTexture) {
@@ -47,7 +48,7 @@
key |= 0x10;
}
b->add32(key);
- this->onGetGLSLProcessorKey(caps, b);
+ this->onAddToKey(caps, b);
}
#ifdef SK_DEBUG
diff --git a/src/gpu/GrXferProcessor.h b/src/gpu/GrXferProcessor.h
index 7c2ec27..9d8f66c 100644
--- a/src/gpu/GrXferProcessor.h
+++ b/src/gpu/GrXferProcessor.h
@@ -59,13 +59,13 @@
class GrXferProcessor : public GrProcessor, public GrNonAtomicRef<GrXferProcessor> {
public:
/**
- * Sets a unique key on the GrProcessorKeyBuilder calls onGetGLSLProcessorKey(...) to get the
- * specific subclass's key.
+ * Adds a key on the GrProcessorKeyBuilder calls onAddToKey(...) to get the specific subclass's
+ * key.
*/
- void getGLSLProcessorKey(const GrShaderCaps&,
- GrProcessorKeyBuilder*,
- const GrSurfaceOrigin* originIfDstTexture,
- bool usesInputAttachmentForDstRead) const;
+ void addToKey(const GrShaderCaps&,
+ GrProcessorKeyBuilder*,
+ const GrSurfaceOrigin* originIfDstTexture,
+ bool usesInputAttachmentForDstRead) const;
/** Returns a new instance of the appropriate *GL* implementation class
for the given GrXferProcessor; caller is responsible for deleting
@@ -114,7 +114,7 @@
from getFactory()).
A return value of true from isEqual() should not be used to test whether the processor would
- generate the same shader code. To test for identical code generation use getGLSLProcessorKey
+ generate the same shader code. To test for identical code generation use addToKey.
*/
bool isEqual(const GrXferProcessor& that) const {
@@ -136,10 +136,10 @@
private:
/**
- * Sets a unique key on the GrProcessorKeyBuilder that is directly associated with this xfer
- * processor's GL backend implementation.
+ * Adds a key on the GrProcessorKeyBuilder that reflects any variety in the code that may be
+ * emitted by the xfer processor subclass.
*/
- virtual void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const = 0;
+ virtual void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const = 0;
/**
* If we are not performing a dst read, returns whether the subclass will set a secondary
diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp
index 3234146..298793b 100644
--- a/src/gpu/effects/GrBezierEffect.cpp
+++ b/src/gpu/effects/GrBezierEffect.cpp
@@ -181,8 +181,7 @@
GrConicEffect::~GrConicEffect() {}
-void GrConicEffect::getGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrConicEffect::addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
GrGLConicEffect::GenKey(*this, caps, b);
}
@@ -357,8 +356,7 @@
GrQuadEffect::~GrQuadEffect() {}
-void GrQuadEffect::getGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrQuadEffect::addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
GrGLQuadEffect::GenKey(*this, caps, b);
}
diff --git a/src/gpu/effects/GrBezierEffect.h b/src/gpu/effects/GrBezierEffect.h
index da12c99..d809081 100644
--- a/src/gpu/effects/GrBezierEffect.h
+++ b/src/gpu/effects/GrBezierEffect.h
@@ -89,7 +89,7 @@
bool usesLocalCoords() const { return fUsesLocalCoords; }
uint8_t coverageScale() const { return fCoverageScale; }
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const override;
@@ -156,7 +156,7 @@
bool usesLocalCoords() const { return fUsesLocalCoords; }
uint8_t coverageScale() const { return fCoverageScale; }
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const override;
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp
index ef9abd2..56af0ba 100644
--- a/src/gpu/effects/GrBicubicEffect.cpp
+++ b/src/gpu/effects/GrBicubicEffect.cpp
@@ -219,8 +219,7 @@
this->cloneAndRegisterAllChildProcessors(that);
}
-void GrBicubicEffect::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrBicubicEffect::onAddToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
uint32_t key = (static_cast<uint32_t>(fDirection) << 0) | (static_cast<uint32_t>(fClamp) << 2);
b->add32(key);
}
diff --git a/src/gpu/effects/GrBicubicEffect.h b/src/gpu/effects/GrBicubicEffect.h
index 79b6c67..b747b31 100644
--- a/src/gpu/effects/GrBicubicEffect.h
+++ b/src/gpu/effects/GrBicubicEffect.h
@@ -114,7 +114,7 @@
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
index 470db88..1e86fcd 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
@@ -193,8 +193,7 @@
this->setTextureSamplerCnt(numActiveViews);
}
-void GrBitmapTextGeoProc::getGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrBitmapTextGeoProc::addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
GrGLBitmapTextGeoProc::GenKey(*this, caps, b);
}
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.h b/src/gpu/effects/GrBitmapTextGeoProc.h
index 5f6eac6..fb69906 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.h
+++ b/src/gpu/effects/GrBitmapTextGeoProc.h
@@ -57,7 +57,7 @@
void addNewViews(const GrSurfaceProxyView*, int numActiveViews, GrSamplerState);
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps& caps) const override;
diff --git a/src/gpu/effects/GrBlendFragmentProcessor.cpp b/src/gpu/effects/GrBlendFragmentProcessor.cpp
index 7636eb51..5165687 100644
--- a/src/gpu/effects/GrBlendFragmentProcessor.cpp
+++ b/src/gpu/effects/GrBlendFragmentProcessor.cpp
@@ -144,7 +144,7 @@
return flags;
}
- void onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
b->add32((int)fMode);
}
diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp
index f0bfa76..2052244 100644
--- a/src/gpu/effects/GrConvexPolyEffect.cpp
+++ b/src/gpu/effects/GrConvexPolyEffect.cpp
@@ -157,8 +157,7 @@
GrConvexPolyEffect::~GrConvexPolyEffect() {}
-void GrConvexPolyEffect::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrConvexPolyEffect::onAddToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
GrGLConvexPolyEffect::GenKey(*this, caps, b);
}
diff --git a/src/gpu/effects/GrConvexPolyEffect.h b/src/gpu/effects/GrConvexPolyEffect.h
index 88b8a8f..2010b99 100644
--- a/src/gpu/effects/GrConvexPolyEffect.h
+++ b/src/gpu/effects/GrConvexPolyEffect.h
@@ -71,7 +71,7 @@
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor& other) const override;
diff --git a/src/gpu/effects/GrCoverageSetOpXP.cpp b/src/gpu/effects/GrCoverageSetOpXP.cpp
index 5bf250e..b8a5385 100644
--- a/src/gpu/effects/GrCoverageSetOpXP.cpp
+++ b/src/gpu/effects/GrCoverageSetOpXP.cpp
@@ -29,8 +29,7 @@
bool invertCoverage() const { return fInvertCoverage; }
private:
-
- void onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override;
@@ -78,8 +77,7 @@
///////////////////////////////////////////////////////////////////////////////
-void CoverageSetOpXP::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void CoverageSetOpXP::onAddToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
GLCoverageSetOpXP::GenKey(*this, caps, b);
}
diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp
index 584524b..e93e84b 100644
--- a/src/gpu/effects/GrCustomXfermode.cpp
+++ b/src/gpu/effects/GrCustomXfermode.cpp
@@ -98,7 +98,7 @@
GrXferBarrierType xferBarrierType(const GrCaps&) const override;
private:
- void onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
void onGetBlendInfo(BlendInfo*) const override;
@@ -169,7 +169,7 @@
///////////////////////////////////////////////////////////////////////////////
-void CustomXP::onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
+void CustomXP::onAddToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
GLCustomXP::GenKey(*this, caps, b);
}
diff --git a/src/gpu/effects/GrDisableColorXP.cpp b/src/gpu/effects/GrDisableColorXP.cpp
index 8e49444..9efbae5 100644
--- a/src/gpu/effects/GrDisableColorXP.cpp
+++ b/src/gpu/effects/GrDisableColorXP.cpp
@@ -24,9 +24,7 @@
private:
const char* name() const override { return "Disable Color"; }
bool onIsEqual(const GrXferProcessor& xpBase) const override { return true; }
- void onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
- return; // No key.
- }
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override {
blendInfo->fWriteColor = false;
}
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
index e269528..ceae8ed 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
@@ -273,8 +273,8 @@
this->setTextureSamplerCnt(numViews);
}
-void GrDistanceFieldA8TextGeoProc::getGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrDistanceFieldA8TextGeoProc::addToKey(const GrShaderCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLDistanceFieldA8TextGeoProc::GenKey(*this, caps, b);
}
@@ -546,8 +546,8 @@
this->setTextureSamplerCnt(numViews);
}
-void GrDistanceFieldPathGeoProc::getGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrDistanceFieldPathGeoProc::addToKey(const GrShaderCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLDistanceFieldPathGeoProc::GenKey(*this, caps, b);
}
@@ -873,8 +873,8 @@
this->setTextureSamplerCnt(numViews);
}
-void GrDistanceFieldLCDTextGeoProc::getGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrDistanceFieldLCDTextGeoProc::addToKey(const GrShaderCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLDistanceFieldLCDTextGeoProc::GenKey(*this, caps, b);
}
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.h b/src/gpu/effects/GrDistanceFieldGeoProc.h
index 7ebee3f..85be4a7 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.h
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.h
@@ -102,7 +102,7 @@
void addNewViews(const GrSurfaceProxyView* views, int numViews, GrSamplerState);
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const override;
@@ -169,7 +169,7 @@
void addNewViews(const GrSurfaceProxyView*, int numActiveViews, GrSamplerState);
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const override;
@@ -251,7 +251,7 @@
void addNewViews(const GrSurfaceProxyView*, int numActiveViews, GrSamplerState);
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const override;
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
index 692bf30..9fb11f4 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
@@ -236,8 +236,8 @@
this->setUsesSampleCoordsDirectly();
}
-void GrGaussianConvolutionFragmentProcessor::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrGaussianConvolutionFragmentProcessor::onAddToKey(const GrShaderCaps& caps,
+ GrProcessorKeyBuilder* b) const {
Impl::GenKey(*this, caps, b);
}
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h
index 7f0369e..bae6ed7 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h
@@ -68,7 +68,7 @@
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index bbea594..a7ef6be 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -316,8 +316,8 @@
return std::unique_ptr<GrFragmentProcessor>(new GrMatrixConvolutionEffect(*this));
}
-void GrMatrixConvolutionEffect::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrMatrixConvolutionEffect::onAddToKey(const GrShaderCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLMatrixConvolutionEffect::GenKey(*this, caps, b);
}
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.h b/src/gpu/effects/GrMatrixConvolutionEffect.h
index b42225f..e7ee96c 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.h
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.h
@@ -112,7 +112,7 @@
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
diff --git a/src/gpu/effects/GrMatrixEffect.cpp b/src/gpu/effects/GrMatrixEffect.cpp
index 05b15f1..ab3bf04 100644
--- a/src/gpu/effects/GrMatrixEffect.cpp
+++ b/src/gpu/effects/GrMatrixEffect.cpp
@@ -61,8 +61,7 @@
return std::make_unique<GrGLSLMatrixEffect>();
}
-void GrMatrixEffect::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {}
+void GrMatrixEffect::onAddToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {}
bool GrMatrixEffect::onIsEqual(const GrFragmentProcessor& other) const {
const GrMatrixEffect& that = other.cast<GrMatrixEffect>();
diff --git a/src/gpu/effects/GrMatrixEffect.h b/src/gpu/effects/GrMatrixEffect.h
index a7d2534..7852a7c 100644
--- a/src/gpu/effects/GrMatrixEffect.h
+++ b/src/gpu/effects/GrMatrixEffect.h
@@ -34,7 +34,7 @@
}
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
SkPMColor4f constantOutputForConstantInput(const SkPMColor4f& inputColor) const override {
return ConstantOutputForConstantInput(this->childProcessor(0), inputColor);
diff --git a/src/gpu/effects/GrModulateAtlasCoverageEffect.h b/src/gpu/effects/GrModulateAtlasCoverageEffect.h
index fee39f1..0096b40 100644
--- a/src/gpu/effects/GrModulateAtlasCoverageEffect.h
+++ b/src/gpu/effects/GrModulateAtlasCoverageEffect.h
@@ -30,7 +30,7 @@
const char* name() const override {
return "GrModulateAtlasCoverageFP";
}
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
b->add32(fFlags & Flags::kCheckBounds);
}
std::unique_ptr<GrFragmentProcessor> clone() const override {
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
index 2ac202a..88b8018 100644
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
@@ -385,7 +385,7 @@
BlendFormula getBlendFormula() const { return fBlendFormula; }
private:
- void onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onHasSecondaryOutput() const override { return fBlendFormula.hasSecondaryOutput(); }
@@ -467,8 +467,7 @@
///////////////////////////////////////////////////////////////////////////////
-void PorterDuffXferProcessor::onGetGLSLProcessorKey(const GrShaderCaps&,
- GrProcessorKeyBuilder* b) const {
+void PorterDuffXferProcessor::onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const {
GLPorterDuffXferProcessor::GenKey(*this, b);
}
@@ -492,7 +491,7 @@
SkBlendMode getXfermode() const { return fXfermode; }
private:
- void onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrXferProcessor& xpBase) const override {
const ShaderPDXferProcessor& xp = xpBase.cast<ShaderPDXferProcessor>();
@@ -536,8 +535,7 @@
///////////////////////////////////////////////////////////////////////////////
-void ShaderPDXferProcessor::onGetGLSLProcessorKey(const GrShaderCaps&,
- GrProcessorKeyBuilder* b) const {
+void ShaderPDXferProcessor::onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const {
GLShaderPDXferProcessor::GenKey(*this, b);
}
@@ -563,7 +561,7 @@
private:
PDLCDXferProcessor(const SkPMColor4f& blendConstant, float alpha);
- void onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override {
blendInfo->fSrcBlend = kConstC_GrBlendCoeff;
@@ -650,8 +648,7 @@
PDLCDXferProcessor::~PDLCDXferProcessor() {
}
-void PDLCDXferProcessor::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void PDLCDXferProcessor::onAddToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
GLPDLCDXferProcessor::GenKey(*this, caps, b);
}
diff --git a/src/gpu/effects/GrRRectEffect.cpp b/src/gpu/effects/GrRRectEffect.cpp
index 48f4eef..e17b6ae 100644
--- a/src/gpu/effects/GrRRectEffect.cpp
+++ b/src/gpu/effects/GrRRectEffect.cpp
@@ -67,7 +67,7 @@
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor& other) const override;
@@ -390,8 +390,7 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
-void CircularRRectEffect::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void CircularRRectEffect::onAddToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
GLCircularRRectEffect::GenKey(*this, caps, b);
}
@@ -421,7 +420,7 @@
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor& other) const override;
@@ -696,8 +695,7 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
-void EllipticalRRectEffect::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void EllipticalRRectEffect::onAddToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
GLEllipticalRRectEffect::GenKey(*this, caps, b);
}
diff --git a/src/gpu/effects/GrShadowGeoProc.h b/src/gpu/effects/GrShadowGeoProc.h
index 93fbdb1..04566ee 100644
--- a/src/gpu/effects/GrShadowGeoProc.h
+++ b/src/gpu/effects/GrShadowGeoProc.h
@@ -34,7 +34,7 @@
const Attribute& inShadowParams() const { return fInShadowParams; }
GrColor color() const { return fColor; }
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {}
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const override;
diff --git a/src/gpu/effects/GrSkSLFP.cpp b/src/gpu/effects/GrSkSLFP.cpp
index 9583a0e..c8c7d34 100644
--- a/src/gpu/effects/GrSkSLFP.cpp
+++ b/src/gpu/effects/GrSkSLFP.cpp
@@ -357,7 +357,7 @@
return std::make_unique<GrGLSLSkSLFP>();
}
-void GrSkSLFP::onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
+void GrSkSLFP::onAddToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
// In the unlikely event of a hash collision, we also include the uniform size in the key.
// That ensures that we will (at worst) use the wrong program, but one that expects the same
// amount of uniform data.
diff --git a/src/gpu/effects/GrSkSLFP.h b/src/gpu/effects/GrSkSLFP.h
index b7affa6..c8953f2 100644
--- a/src/gpu/effects/GrSkSLFP.h
+++ b/src/gpu/effects/GrSkSLFP.h
@@ -169,7 +169,7 @@
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
diff --git a/src/gpu/effects/GrTextureEffect.cpp b/src/gpu/effects/GrTextureEffect.cpp
index 3663787c..578c246 100644
--- a/src/gpu/effects/GrTextureEffect.cpp
+++ b/src/gpu/effects/GrTextureEffect.cpp
@@ -720,7 +720,7 @@
return std::make_unique<Impl>();
}
-void GrTextureEffect::onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const {
+void GrTextureEffect::onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const {
auto m0 = static_cast<uint32_t>(fShaderModes[0]);
b->addBits(8, m0, "shaderMode0");
diff --git a/src/gpu/effects/GrTextureEffect.h b/src/gpu/effects/GrTextureEffect.h
index 4c0cefb..79a16c5 100644
--- a/src/gpu/effects/GrTextureEffect.h
+++ b/src/gpu/effects/GrTextureEffect.h
@@ -168,7 +168,7 @@
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp
index a3b5a45..e846aa2 100644
--- a/src/gpu/effects/GrYUVtoRGBEffect.cpp
+++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp
@@ -338,8 +338,7 @@
return std::make_unique<GrGLSLYUVtoRGBEffect>();
}
-void GrYUVtoRGBEffect::onGetGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrYUVtoRGBEffect::onAddToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
uint32_t packed = 0;
int i = 0;
for (auto [plane, channel] : fLocations) {
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.h b/src/gpu/effects/GrYUVtoRGBEffect.h
index e0acfb0..7135f82 100644
--- a/src/gpu/effects/GrYUVtoRGBEffect.h
+++ b/src/gpu/effects/GrYUVtoRGBEffect.h
@@ -41,7 +41,7 @@
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override;
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index 9ea7af3..6c1a87c 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -642,7 +642,7 @@
UniformHandle fLocalMatrixUniform;
};
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
+ void addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
GLSLProcessor::GenKey(*this, caps, b);
}
diff --git a/src/gpu/ops/GrDashOp.cpp b/src/gpu/ops/GrDashOp.cpp
index 30a0c69..9351f54 100644
--- a/src/gpu/ops/GrDashOp.cpp
+++ b/src/gpu/ops/GrDashOp.cpp
@@ -830,7 +830,7 @@
bool usesLocalCoords() const { return fUsesLocalCoords; }
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override;
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const override;
@@ -981,8 +981,7 @@
});
}
-void DashingCircleEffect::getGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void DashingCircleEffect::addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
GLDashingCircleEffect::GenKey(*this, caps, b);
}
@@ -1053,7 +1052,7 @@
bool usesLocalCoords() const { return fUsesLocalCoords; }
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const override;
@@ -1220,8 +1219,7 @@
});
}
-void DashingLineEffect::getGLSLProcessorKey(const GrShaderCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void DashingLineEffect::addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const {
GLDashingLineEffect::GenKey(*this, caps, b);
}
diff --git a/src/gpu/ops/GrDrawAtlasPathOp.cpp b/src/gpu/ops/GrDrawAtlasPathOp.cpp
index a05999c..bd855e8 100644
--- a/src/gpu/ops/GrDrawAtlasPathOp.cpp
+++ b/src/gpu/ops/GrDrawAtlasPathOp.cpp
@@ -49,7 +49,7 @@
private:
int colorAttribIdx() const { return fUsesLocalCoords ? 3 : 1; }
const char* name() const override { return "DrawAtlasPathShader"; }
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
b->addBits(1, fUsesLocalCoords, "localCoords");
fAtlasHelper->getKeyBits(b);
}
diff --git a/src/gpu/ops/GrDrawVerticesOp.cpp b/src/gpu/ops/GrDrawVerticesOp.cpp
index d73a252..8224653 100644
--- a/src/gpu/ops/GrDrawVerticesOp.cpp
+++ b/src/gpu/ops/GrDrawVerticesOp.cpp
@@ -157,7 +157,7 @@
using INHERITED = GrGLSLGeometryProcessor;
};
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
+ void addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
GLSLProcessor::GenKey(*this, caps, b);
}
diff --git a/src/gpu/ops/GrFillRRectOp.cpp b/src/gpu/ops/GrFillRRectOp.cpp
index 974eec8..2601ebd 100644
--- a/src/gpu/ops/GrFillRRectOp.cpp
+++ b/src/gpu/ops/GrFillRRectOp.cpp
@@ -339,7 +339,7 @@
const char* name() const final { return "GrFillRRectOp::Processor"; }
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const final {
+ void addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const final {
b->addBits(kNumProcessorFlags, (uint32_t)fFlags, "flags");
}
diff --git a/src/gpu/ops/GrLatticeOp.cpp b/src/gpu/ops/GrLatticeOp.cpp
index 0cfd79c..90f82a4 100644
--- a/src/gpu/ops/GrLatticeOp.cpp
+++ b/src/gpu/ops/GrLatticeOp.cpp
@@ -41,7 +41,7 @@
const char* name() const override { return "LatticeGP"; }
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
b->add32(GrColorSpaceXform::XformKey(fColorSpaceXform.get()));
}
diff --git a/src/gpu/ops/GrOvalOpFactory.cpp b/src/gpu/ops/GrOvalOpFactory.cpp
index e9d1d04..df41947 100644
--- a/src/gpu/ops/GrOvalOpFactory.cpp
+++ b/src/gpu/ops/GrOvalOpFactory.cpp
@@ -75,7 +75,7 @@
const char* name() const override { return "CircleGeometryProcessor"; }
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
+ void addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
GLSLProcessor::GenKey(*this, caps, b);
}
@@ -284,7 +284,7 @@
const char* name() const override { return "ButtCapDashedCircleGeometryProcessor"; }
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
+ void addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
GLSLProcessor::GenKey(*this, caps, b);
}
@@ -549,7 +549,7 @@
const char* name() const override { return "EllipseGeometryProcessor"; }
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
+ void addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
GLSLProcessor::GenKey(*this, caps, b);
}
@@ -755,7 +755,7 @@
const char* name() const override { return "DIEllipseGeometryProcessor"; }
- void getGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
+ void addToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
GLSLProcessor::GenKey(*this, caps, b);
}
diff --git a/src/gpu/ops/GrQuadPerEdgeAA.cpp b/src/gpu/ops/GrQuadPerEdgeAA.cpp
index 0c8d482..cb3e198 100644
--- a/src/gpu/ops/GrQuadPerEdgeAA.cpp
+++ b/src/gpu/ops/GrQuadPerEdgeAA.cpp
@@ -571,7 +571,7 @@
const char* name() const override { return "QuadPerEdgeAAGeometryProcessor"; }
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
// texturing, device-dimensions are single bit flags
b->addBool(fTexSubset.isInitialized(), "subset");
b->addBool(fSampler.isInitialized(), "textured");
diff --git a/src/gpu/tessellate/GrPathInnerTriangulateOp.cpp b/src/gpu/tessellate/GrPathInnerTriangulateOp.cpp
index 635e122..0958cec 100644
--- a/src/gpu/tessellate/GrPathInnerTriangulateOp.cpp
+++ b/src/gpu/tessellate/GrPathInnerTriangulateOp.cpp
@@ -49,7 +49,7 @@
private:
const char* name() const final { return "tessellate_HullShader"; }
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const final;
constexpr static int kMaxInstanceAttribCount = 3;
diff --git a/src/gpu/tessellate/GrPathStencilCoverOp.cpp b/src/gpu/tessellate/GrPathStencilCoverOp.cpp
index 8d5a77a..ddeadc9 100644
--- a/src/gpu/tessellate/GrPathStencilCoverOp.cpp
+++ b/src/gpu/tessellate/GrPathStencilCoverOp.cpp
@@ -48,7 +48,7 @@
private:
const char* name() const final { return "tessellate_BoundingBoxShader"; }
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const final;
const SkPMColor4f fColor;
diff --git a/src/gpu/tessellate/shaders/GrPathTessellationShader.cpp b/src/gpu/tessellate/shaders/GrPathTessellationShader.cpp
index 30f3816..efd9048 100644
--- a/src/gpu/tessellate/shaders/GrPathTessellationShader.cpp
+++ b/src/gpu/tessellate/shaders/GrPathTessellationShader.cpp
@@ -27,7 +27,7 @@
private:
const char* name() const final { return "tessellate_SimpleTriangleShader"; }
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const final;
};
diff --git a/src/gpu/tessellate/shaders/GrPathTessellationShader_Hardware.cpp b/src/gpu/tessellate/shaders/GrPathTessellationShader_Hardware.cpp
index c49ce8b..91d1a82 100644
--- a/src/gpu/tessellate/shaders/GrPathTessellationShader_Hardware.cpp
+++ b/src/gpu/tessellate/shaders/GrPathTessellationShader_Hardware.cpp
@@ -40,7 +40,7 @@
private:
const char* name() const final { return "tessellate_HardwareWedgeShader"; }
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const final;
};
@@ -167,7 +167,7 @@
private:
const char* name() const final { return "tessellate_HardwareCurveShader"; }
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const final;
};
diff --git a/src/gpu/tessellate/shaders/GrPathTessellationShader_MiddleOut.cpp b/src/gpu/tessellate/shaders/GrPathTessellationShader_MiddleOut.cpp
index da8a82d..1a0391d 100644
--- a/src/gpu/tessellate/shaders/GrPathTessellationShader_MiddleOut.cpp
+++ b/src/gpu/tessellate/shaders/GrPathTessellationShader_MiddleOut.cpp
@@ -53,7 +53,7 @@
private:
const char* name() const final { return "tessellate_MiddleOutShader"; }
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const final {
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const final {
b->add32((uint32_t)fPatchType);
}
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const final;
diff --git a/src/gpu/tessellate/shaders/GrStrokeTessellationShader.cpp b/src/gpu/tessellate/shaders/GrStrokeTessellationShader.cpp
index 2e88d9f..6b18c39 100644
--- a/src/gpu/tessellate/shaders/GrStrokeTessellationShader.cpp
+++ b/src/gpu/tessellate/shaders/GrStrokeTessellationShader.cpp
@@ -388,8 +388,7 @@
}
}
-void GrStrokeTessellationShader::getGLSLProcessorKey(const GrShaderCaps&,
- GrProcessorKeyBuilder* b) const {
+void GrStrokeTessellationShader::addToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const {
bool keyNeedsJoin = (fMode != Mode::kHardwareTessellation) &&
!(fShaderFlags & ShaderFlags::kDynamicStroke);
SkASSERT((int)fMode >> 2 == 0);
diff --git a/src/gpu/tessellate/shaders/GrStrokeTessellationShader.h b/src/gpu/tessellate/shaders/GrStrokeTessellationShader.h
index 2da360e..fe81ce2 100644
--- a/src/gpu/tessellate/shaders/GrStrokeTessellationShader.h
+++ b/src/gpu/tessellate/shaders/GrStrokeTessellationShader.h
@@ -133,7 +133,7 @@
}
SkUNREACHABLE;
}
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override;
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const final;
const Mode fMode;
diff --git a/src/shaders/SkPerlinNoiseShader.cpp b/src/shaders/SkPerlinNoiseShader.cpp
index eddbabc..1db7d24 100644
--- a/src/shaders/SkPerlinNoiseShader.cpp
+++ b/src/shaders/SkPerlinNoiseShader.cpp
@@ -630,7 +630,7 @@
return std::make_unique<GrGLPerlinNoise>();
}
- void onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
+ void onAddToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
GrGLPerlinNoise::GenKey(*this, caps, b);
}
diff --git a/tests/GrMeshTest.cpp b/tests/GrMeshTest.cpp
index 594d884..f9ed7a4 100644
--- a/tests/GrMeshTest.cpp
+++ b/tests/GrMeshTest.cpp
@@ -456,7 +456,7 @@
return fVertexColor.isInitialized() ? fVertexColor : fInstanceColor;
}
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const final {
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const final {
b->add32(fInstanceLocation.isInitialized());
b->add32(fVertexPosition.isInitialized());
}
diff --git a/tests/GrPipelineDynamicStateTest.cpp b/tests/GrPipelineDynamicStateTest.cpp
index 0f89746..9108004 100644
--- a/tests/GrPipelineDynamicStateTest.cpp
+++ b/tests/GrPipelineDynamicStateTest.cpp
@@ -66,7 +66,7 @@
const char* name() const override { return "GrPipelineDynamicStateTest Processor"; }
- void getGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const final {}
GrGLSLGeometryProcessor* createGLSLInstance(const GrShaderCaps&) const final;
diff --git a/tests/LazyProxyTest.cpp b/tests/LazyProxyTest.cpp
index c29e82e..dff8954 100644
--- a/tests/LazyProxyTest.cpp
+++ b/tests/LazyProxyTest.cpp
@@ -160,7 +160,7 @@
std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override {
return nullptr;
}
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor&) const override { return false; }
GrRecordingContext* const fContext;
diff --git a/tests/PrimitiveProcessorTest.cpp b/tests/PrimitiveProcessorTest.cpp
index e44157f..c1b8b20 100644
--- a/tests/PrimitiveProcessorTest.cpp
+++ b/tests/PrimitiveProcessorTest.cpp
@@ -92,8 +92,7 @@
};
return new GLSLGP();
}
- void getGLSLProcessorKey(const GrShaderCaps&,
- GrProcessorKeyBuilder* builder) const override {
+ void addToKey(const GrShaderCaps&, GrProcessorKeyBuilder* builder) const override {
builder->add32(fNumAttribs);
}
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp
index 01be63a..be3ad15 100644
--- a/tests/ProcessorTest.cpp
+++ b/tests/ProcessorTest.cpp
@@ -98,7 +98,7 @@
const char* name() const override { return "test"; }
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder* b) const override {
static std::atomic<int32_t> nextKey{0};
b->add32(nextKey++);
}
diff --git a/tests/ProgramsTest.cpp b/tests/ProgramsTest.cpp
index 4aaebec..8f6eb10 100644
--- a/tests/ProgramsTest.cpp
+++ b/tests/ProgramsTest.cpp
@@ -71,7 +71,7 @@
private:
BigKeyProcessor() : INHERITED(kBigKeyProcessor_ClassID, kNone_OptimizationFlags) { }
- void onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
+ void onAddToKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {
GLBigKeyProcessor::GenKey(*this, caps, b);
}
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
@@ -124,7 +124,7 @@
this->registerChild(std::move(child));
}
- void onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override {}
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
diff --git a/tests/SkRuntimeEffectTest.cpp b/tests/SkRuntimeEffectTest.cpp
index d5409e4..3bad295 100644
--- a/tests/SkRuntimeEffectTest.cpp
+++ b/tests/SkRuntimeEffectTest.cpp
@@ -947,8 +947,7 @@
GrSkSLFP::OptFlags::kNone,
"color", GrSkSLFP::SpecializeIf(specialize, color));
GrProcessorKeyBuilder builder(&result.key);
- result.fp->getGLSLProcessorKey(*ctxInfo.directContext()->priv().caps()->shaderCaps(),
- &builder);
+ result.fp->addToKey(*ctxInfo.directContext()->priv().caps()->shaderCaps(), &builder);
builder.flush();
return result;
};
diff --git a/tests/SkSLCross.cpp b/tests/SkSLCross.cpp
index 35dc97d..b683ff5 100644
--- a/tests/SkSLCross.cpp
+++ b/tests/SkSLCross.cpp
@@ -49,7 +49,7 @@
std::unique_ptr<GrFragmentProcessor> clone() const override {
return std::unique_ptr<GrFragmentProcessor>(new VisualizeCrossProductSignFP(fA, fB));
}
- void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
+ void onAddToKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
class Impl : public GrGLSLFragmentProcessor {
diff --git a/tools/gpu/TestOps.cpp b/tools/gpu/TestOps.cpp
index bec74c6..4f02962 100644
--- a/tools/gpu/TestOps.cpp
+++ b/tools/gpu/TestOps.cpp
@@ -36,8 +36,7 @@
return new GLSLGP();
}
- void getGLSLProcessorKey(const GrShaderCaps& shaderCaps,
- GrProcessorKeyBuilder* b) const override {
+ void addToKey(const GrShaderCaps& shaderCaps, GrProcessorKeyBuilder* b) const override {
GLSLGP::GenKey(*this, shaderCaps, b);
}