const SkMatrix& matrix() const { return fCoordTransform.getMatrix(); }
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override {
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
return new GrGLPerlinNoise2(*this);
}
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override {
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const override {
GrGLPerlinNoise2::GenKey(*this, caps, b);
}
const SkMatrix& matrix() const { return fCoordTransform.getMatrix(); }
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override {
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
return new GrGLImprovedPerlinNoise(*this);
}
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override {
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const override {
GrGLImprovedPerlinNoise::GenKey(*this, caps, b);
}
this->initClassID<DCFP>();
}
- GrGLSLFragmentProcessor* onCreateGLInstance() const override {
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
class DCGLFP : public GrGLSLFragmentProcessor {
void emitCode(EmitArgs& args) override {
GrGLSLFragmentBuilder* fpb = args.fBuilder->getFragmentShaderBuilder();
}
private:
- void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override {}
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const override {}
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
~GrFragmentProcessor() override;
- GrGLSLFragmentProcessor* createGLInstance() const;
+ GrGLSLFragmentProcessor* createGLSLInstance() const;
- void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
- this->onGetGLProcessorKey(caps, b);
+ void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
+ this->onGetGLSLProcessorKey(caps, b);
for (int i = 0; i < fChildProcessors.count(); ++i) {
- fChildProcessors[i]->getGLProcessorKey(caps, b);
+ fChildProcessors[i]->getGLSLProcessorKey(caps, b);
}
}
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 getGLProcessorKey*/
+ generate the same shader code. To test for identical code generation use getGLSLProcessorKey
+ */
bool isEqual(const GrFragmentProcessor& that, bool ignoreCoordTransforms) const;
/**
/** Returns a new instance of the appropriate *GL* implementation class
for the given GrFragmentProcessor; caller is responsible for deleting
the object. */
- virtual GrGLSLFragmentProcessor* onCreateGLInstance() const = 0;
+ virtual GrGLSLFragmentProcessor* onCreateGLSLInstance() const = 0;
/** Implemented using GLFragmentProcessor::GenKey as described in this class's comment. */
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const = 0;
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const = 0;
/**
* Subclass implements this to support isEqual(). It will only be called if it is known that
};
/**
- * Sets a unique key on the GrProcessorKeyBuilder calls onGetGLProcessorKey(...) to get the
+ * Sets a unique key on the GrProcessorKeyBuilder calls onGetGLSLProcessorKey(...) to get the
* specific subclass's key.
*/
- void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const;
+ void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const;
/** Returns a new instance of the appropriate *GL* implementation class
for the given GrXferProcessor; caller is responsible for deleting
the object. */
- virtual GrGLSLXferProcessor* createGLInstance() const = 0;
+ virtual GrGLSLXferProcessor* createGLSLInstance() const = 0;
/**
* Optimizations for blending / coverage that an OptDrawState should apply to itself.
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 getGLProcessorKey*/
+ generate the same shader code. To test for identical code generation use getGLSLProcessorKey
+ */
bool isEqual(const GrXferProcessor& that) const {
if (this->classID() != that.classID()) {
* Sets a unique key on the GrProcessorKeyBuilder that is directly associated with this xfer
* processor's GL backend implementation.
*/
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const = 0;
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const = 0;
/**
* Determines the type of barrier (if any) required by the subclass. Note that the possibility
this->initClassID<GrConstColorProcessor>();
}
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
GrGLSLProgramDataManager::UniformHandle fXformUni;
};
- void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
LightingGLFP::GenKey(*this, caps, b);
}
const SkVector& invNormRotation() const { return fInvNormRotation; }
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override { return new LightingGLFP; }
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override { return new LightingGLFP; }
bool onIsEqual(const GrFragmentProcessor& proc) const override {
const LightingFP& lightingFP = proc.cast<LightingFP>();
this->setWillReadFragmentPosition();
}
-GrGLSLFragmentProcessor* GrCircleBlurFragmentProcessor::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrCircleBlurFragmentProcessor::onCreateGLSLInstance() const {
return new GrGLCircleBlurFragmentProcessor(*this);
}
-void GrCircleBlurFragmentProcessor::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrCircleBlurFragmentProcessor::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLCircleBlurFragmentProcessor::GenKey(*this, caps, b);
}
GrCircleBlurFragmentProcessor(const SkRect& circle, float sigma,
float offset, GrTexture* blurProfile);
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
bool onIsEqual(const GrFragmentProcessor& other) const override {
const GrCircleBlurFragmentProcessor& cbfp = other.cast<GrCircleBlurFragmentProcessor>();
this->addTextureAccess(&fMaskTextureAccess);
}
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
///////////////////////////////////////////////////////////////////////////////
-void AlphaThresholdEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void AlphaThresholdEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLAlphaThresholdEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* AlphaThresholdEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* AlphaThresholdEffect::onCreateGLSLInstance() const {
return new GrGLAlphaThresholdEffect(*this);
}
SkASSERT(0 == dstIndex);
}
-void GrArithmeticFP::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
+void GrArithmeticFP::onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
GLArithmeticFP::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* GrArithmeticFP::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrArithmeticFP::onCreateGLSLInstance() const {
return new GLArithmeticFP(*this);
}
const char* name() const override { return "Arithmetic"; }
- GrGLSLXferProcessor* createGLInstance() const override;
+ GrGLSLXferProcessor* createGLSLInstance() const override;
float k1() const { return fK1; }
float k2() const { return fK2; }
GrColor* overrideColor,
const GrCaps& caps) override;
- void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
bool onIsEqual(const GrXferProcessor& xpBase) const override {
const ArithmeticXP& xp = xpBase.cast<ArithmeticXP>();
this->initClassID<ArithmeticXP>();
}
-void ArithmeticXP::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
+void ArithmeticXP::onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
GLArithmeticXP::GenKey(*this, caps, b);
}
-GrGLSLXferProcessor* ArithmeticXP::createGLInstance() const { return new GLArithmeticXP(*this); }
+GrGLSLXferProcessor* ArithmeticXP::createGLSLInstance() const { return new GLArithmeticXP(*this); }
GrXferProcessor::OptFlags ArithmeticXP::onGetOptimizations(const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
bool enforcePMColor() const { return fEnforcePMColor; }
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
GrRectBlurEffect(const SkRect& rect, float sigma, GrTexture *blurProfile,
GrSLPrecision fPrecision);
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
this->setWillReadFragmentPosition();
}
-void GrRectBlurEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrRectBlurEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLRectBlurEffect::GenKey(fPrecision, b);
}
-GrGLSLFragmentProcessor* GrRectBlurEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrRectBlurEffect::onCreateGLSLInstance() const {
return new GrGLRectBlurEffect(*this, fPrecision);
}
float getSigma() const { return fSigma; }
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
GrRRectBlurEffect(float sigma, const SkRRect&, GrTexture* profileTexture);
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override;
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const override;
bool onIsEqual(const GrFragmentProcessor& other) const override;
pdman.set1f(fCornerRadiusUniform, radius);
}
-void GrRRectBlurEffect::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
+void GrRRectBlurEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLRRectBlurEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* GrRRectBlurEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrRRectBlurEffect::onCreateGLSLInstance() const {
return new GrGLRRectBlurEffect(*this);
}
void onComputeInvariantOutput(GrInvariantOutput*) const override;
- class GLProcessor : public GrGLSLFragmentProcessor {
+ class GLSLProcessor : public GrGLSLFragmentProcessor {
public:
- GLProcessor(const GrProcessor&);
- virtual ~GLProcessor();
+ GLSLProcessor(const GrProcessor&);
+ virtual ~GLSLProcessor();
virtual void emitCode(EmitArgs&) override;
};
private:
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
GrProcessorKeyBuilder* b) const override;
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
GrColorCubeEffect::~GrColorCubeEffect() {
}
-void GrColorCubeEffect::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
- GLProcessor::GenKey(*this, caps, b);
+void GrColorCubeEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
+ GLSLProcessor::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* GrColorCubeEffect::onCreateGLInstance() const {
- return new GLProcessor(*this);
+GrGLSLFragmentProcessor* GrColorCubeEffect::onCreateGLSLInstance() const {
+ return new GLSLProcessor(*this);
}
void GrColorCubeEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
///////////////////////////////////////////////////////////////////////////////
-GrColorCubeEffect::GLProcessor::GLProcessor(const GrProcessor&) {
+GrColorCubeEffect::GLSLProcessor::GLSLProcessor(const GrProcessor&) {
}
-GrColorCubeEffect::GLProcessor::~GLProcessor() {
+GrColorCubeEffect::GLSLProcessor::~GLSLProcessor() {
}
-void GrColorCubeEffect::GLProcessor::emitCode(EmitArgs& args) {
+void GrColorCubeEffect::GLSLProcessor::emitCode(EmitArgs& args) {
if (nullptr == args.fInputColor) {
args.fInputColor = "vec4(1)";
}
cubeIdx, nonZeroAlpha, args.fInputColor);
}
-void GrColorCubeEffect::GLProcessor::onSetData(const GrGLSLProgramDataManager& pdman,
- const GrProcessor& proc) {
+void GrColorCubeEffect::GLSLProcessor::onSetData(const GrGLSLProgramDataManager& pdman,
+ const GrProcessor& proc) {
const GrColorCubeEffect& colorCube = proc.cast<GrColorCubeEffect>();
SkScalar size = SkIntToScalar(colorCube.colorCubeSize());
pdman.set1f(fColorCubeSizeUni, SkScalarToFloat(size));
pdman.set1f(fColorCubeInvSizeUni, SkScalarToFloat(SkScalarInvert(size)));
}
-void GrColorCubeEffect::GLProcessor::GenKey(const GrProcessor& proc,
- const GrGLSLCaps&, GrProcessorKeyBuilder* b) {
+void GrColorCubeEffect::GLSLProcessor::GenKey(const GrProcessor& proc,
+ const GrGLSLCaps&, GrProcessorKeyBuilder* b) {
}
const GrFragmentProcessor* SkColorCubeFilter::asFragmentProcessor(GrContext* context) const {
GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
- class GLProcessor : public GrGLSLFragmentProcessor {
+ class GLSLProcessor : public GrGLSLFragmentProcessor {
public:
// this class always generates the same code.
static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder* b) {}
- GLProcessor(const GrProcessor&) {}
+ GLSLProcessor(const GrProcessor&) {}
virtual void emitCode(EmitArgs& args) override {
fMatrixHandle = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
this->initClassID<ColorMatrixEffect>();
}
- GrGLSLFragmentProcessor* onCreateGLInstance() const override { return new GLProcessor(*this); }
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
+ return new GLSLProcessor(*this);
+ }
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override {
- GLProcessor::GenKey(*this, caps, b);
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const override {
+ GLSLProcessor::GenKey(*this, caps, b);
}
bool onIsEqual(const GrFragmentProcessor& s) const override {
const GrTextureDomain& domain() const { return fDomain; }
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override {
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
return new GrGLDisplacementMapEffect(*this);
}
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override {
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const override {
GrGLDisplacementMapEffect::GenKey(*this, caps, b);
}
SkScalar kd() const { return fKD; }
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
const char* name() const override { return "SpecularLighting"; }
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
SkScalar ks() const { return fKS; }
SkScalar shininess() const { return fShininess; }
private:
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
this->kd() == s.kd();
}
-void GrDiffuseLightingEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrDiffuseLightingEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLDiffuseLightingEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* GrDiffuseLightingEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrDiffuseLightingEffect::onCreateGLSLInstance() const {
return new GrGLDiffuseLightingEffect(*this);
}
this->shininess() == s.shininess();
}
-void GrSpecularLightingEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrSpecularLightingEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLSpecularLightingEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* GrSpecularLightingEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrSpecularLightingEffect::onCreateGLSLInstance() const {
return new GrGLSpecularLightingEffect(*this);
}
const char* name() const override { return "Luminance-to-Alpha"; }
- class GLProcessor : public GrGLSLFragmentProcessor {
+ class GLSLProcessor : public GrGLSLFragmentProcessor {
public:
- GLProcessor(const GrProcessor&) {}
+ GLSLProcessor(const GrProcessor&) {}
static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder* b) {}
this->initClassID<LumaColorFilterEffect>();
}
- GrGLSLFragmentProcessor* onCreateGLInstance() const override { return new GLProcessor(*this); }
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
+ return new GLSLProcessor(*this);
+ }
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override {
- GLProcessor::GenKey(*this, caps, b);
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const override {
+ GLSLProcessor::GenKey(*this, caps, b);
}
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
this->initClassID<GrMagnifierEffect>();
}
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
/////////////////////////////////////////////////////////////////////
-void GrMagnifierEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrMagnifierEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLMagnifierEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* GrMagnifierEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrMagnifierEffect::onCreateGLSLInstance() const {
return new GrGLMagnifierEffect(*this);
}
float fRange[2];
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
GrMorphologyEffect::~GrMorphologyEffect() {
}
-void GrMorphologyEffect::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
+void GrMorphologyEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLMorphologyEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* GrMorphologyEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrMorphologyEffect::onCreateGLSLInstance() const {
return new GrGLMorphologyEffect(*this);
}
bool GrMorphologyEffect::onIsEqual(const GrFragmentProcessor& sBase) const {
const SkMatrix& matrix() const { return fCoordTransform.getMatrix(); }
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override {
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
return new GrGLPerlinNoise(*this);
}
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override {
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const override {
GrGLPerlinNoise::GenKey(*this, caps, b);
}
int atlasRow() const { return fRow; }
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
}
}
-void ColorTableEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void ColorTableEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GLColorTableEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* ColorTableEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* ColorTableEffect::onCreateGLSLInstance() const {
return new GLColorTableEffect(*this);
}
this->initClassID<GrLinearGradient>();
}
- GrGLSLFragmentProcessor* onCreateGLInstance() const override {
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
return new GrGLLinearGradient(*this);
}
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override {
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const override {
GrGLLinearGradient::GenKey(*this, caps, b);
}
this->initClassID<GrRadialGradient>();
}
- GrGLSLFragmentProcessor* onCreateGLInstance() const override {
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
return new GrGLRadialGradient(*this);
}
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override {
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const override {
GrGLRadialGradient::GenKey(*this, caps, b);
}
this->initClassID<GrSweepGradient>();
}
- GrGLSLFragmentProcessor* onCreateGLInstance() const override {
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
return new GrGLSweepGradient(*this);
}
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override {
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const override {
GrGLSweepGradient::GenKey(*this, caps, b);
}
SkScalar radius() const { return fRadius0; }
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor& sBase) const override {
const Edge2PtConicalEffect& s = sBase.cast<Edge2PtConicalEffect>();
};
-void Edge2PtConicalEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void Edge2PtConicalEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GLEdge2PtConicalEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* Edge2PtConicalEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* Edge2PtConicalEffect::onCreateGLSLInstance() const {
return new GLEdge2PtConicalEffect(*this);
}
SkScalar focal() const { return fFocalX; }
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor& sBase) const override {
const FocalOutside2PtConicalEffect& s = sBase.cast<FocalOutside2PtConicalEffect>();
};
-void FocalOutside2PtConicalEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void FocalOutside2PtConicalEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GLFocalOutside2PtConicalEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* FocalOutside2PtConicalEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* FocalOutside2PtConicalEffect::onCreateGLSLInstance() const {
return new GLFocalOutside2PtConicalEffect(*this);
}
SkScalar focal() const { return fFocalX; }
- typedef GLFocalInside2PtConicalEffect GLProcessor;
+ typedef GLFocalInside2PtConicalEffect GLSLProcessor;
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor& sBase) const override {
const FocalInside2PtConicalEffect& s = sBase.cast<FocalInside2PtConicalEffect>();
};
-void FocalInside2PtConicalEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void FocalInside2PtConicalEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GLFocalInside2PtConicalEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* FocalInside2PtConicalEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* FocalInside2PtConicalEffect::onCreateGLSLInstance() const {
return new GLFocalInside2PtConicalEffect(*this);
}
SkScalar C() const { return fInfo.fC; }
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override;
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const override;
bool onIsEqual(const GrFragmentProcessor& sBase) const override {
const CircleInside2PtConicalEffect& s = sBase.cast<CircleInside2PtConicalEffect>();
};
-void CircleInside2PtConicalEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void CircleInside2PtConicalEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GLCircleInside2PtConicalEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* CircleInside2PtConicalEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* CircleInside2PtConicalEffect::onCreateGLSLInstance() const {
return new GLCircleInside2PtConicalEffect(*this);
}
bool isFlipped() const { return fIsFlipped; }
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor& sBase) const override {
const CircleOutside2PtConicalEffect& s = sBase.cast<CircleOutside2PtConicalEffect>();
};
-void CircleOutside2PtConicalEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void CircleOutside2PtConicalEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GLCircleOutside2PtConicalEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* CircleOutside2PtConicalEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* CircleOutside2PtConicalEffect::onCreateGLSLInstance() const {
return new GLCircleOutside2PtConicalEffect(*this);
}
bool coverageWillBeIgnored() const { return fCoverageWillBeIgnored; }
bool hasVertexCoverage() const { return SkToBool(fInCoverage); }
- class GLProcessor : public GrGLSLGeometryProcessor {
+ class GLSLProcessor : public GrGLSLGeometryProcessor {
public:
- GLProcessor()
+ GLSLProcessor()
: fViewMatrix(SkMatrix::InvalidMatrix()), fColor(GrColor_ILLEGAL), fCoverage(0xff) {}
void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override {
typedef GrGLSLGeometryProcessor INHERITED;
};
- void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
- GLProcessor::GenKey(*this, caps, b);
+ void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
+ GLSLProcessor::GenKey(*this, caps, b);
}
- GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override {
- return new GLProcessor();
+ GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const override {
+ return new GLSLProcessor();
}
private:
return true;
}
-GrGLSLFragmentProcessor* GrFragmentProcessor::createGLInstance() const {
- GrGLSLFragmentProcessor* glFragProc = this->onCreateGLInstance();
+GrGLSLFragmentProcessor* GrFragmentProcessor::createGLSLInstance() const {
+ GrGLSLFragmentProcessor* glFragProc = this->onCreateGLSLInstance();
glFragProc->fChildProcessors.push_back_n(fChildProcessors.count());
for (int i = 0; i < fChildProcessors.count(); ++i) {
- glFragProc->fChildProcessors[i] = fChildProcessors[i]->createGLInstance();
+ glFragProc->fChildProcessors[i] = fChildProcessors[i]->createGLSLInstance();
}
return glFragProc;
}
const char* name() const override { return "Premultiply"; }
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override {
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
class GLFP : public GrGLSLFragmentProcessor {
public:
GLFP() {}
return new GLFP;
}
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override {}
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
const char* name() const override { return "Replace Color"; }
- GrGLSLFragmentProcessor* onCreateGLInstance() const override {
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
class GLFP : public GrGLSLFragmentProcessor {
public:
GLFP() : fHaveSetColor(false) {}
}
private:
- void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {}
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override
+ {}
bool onIsEqual(const GrFragmentProcessor& that) const override {
return fColor == that.cast<ReplaceInputFragmentProcessor>().fColor;
const char* name() const override { return "Series"; }
- GrGLSLFragmentProcessor* onCreateGLInstance() const override {
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
class GLFP : public GrGLSLFragmentProcessor {
public:
GLFP() {}
}
private:
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override {}
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
inline bool isStroked() const { return fStroke; }
- class GLProcessor : public GrGLSLGeometryProcessor {
+ class GLSLProcessor : public GrGLSLGeometryProcessor {
public:
- GLProcessor()
+ GLSLProcessor()
: fColor(GrColor_ILLEGAL) {}
void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override{
typedef GrGLSLGeometryProcessor INHERITED;
};
- void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
- GLProcessor::GenKey(*this, caps, b);
+ void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
+ GLSLProcessor::GenKey(*this, caps, b);
}
- GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override {
- return new GLProcessor();
+ GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const override {
+ return new GLSLProcessor();
}
private:
inline bool isStroked() const { return fStroke; }
- class GLProcessor : public GrGLSLGeometryProcessor {
+ class GLSLProcessor : public GrGLSLGeometryProcessor {
public:
- GLProcessor()
+ GLSLProcessor()
: fColor(GrColor_ILLEGAL) {}
void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override{
typedef GrGLSLGeometryProcessor INHERITED;
};
- void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
- GLProcessor::GenKey(*this, caps, b);
+ void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
+ GLSLProcessor::GenKey(*this, caps, b);
}
- GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override {
- return new GLProcessor();
+ GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const override {
+ return new GLSLProcessor();
}
private:
inline Mode getMode() const { return fMode; }
- class GLProcessor : public GrGLSLGeometryProcessor {
+ class GLSLProcessor : public GrGLSLGeometryProcessor {
public:
- GLProcessor()
+ GLSLProcessor()
: fViewMatrix(SkMatrix::InvalidMatrix()), fColor(GrColor_ILLEGAL) {}
void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override {
typedef GrGLSLGeometryProcessor INHERITED;
};
- void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
- GLProcessor::GenKey(*this, caps, b);
+ void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
+ GLSLProcessor::GenKey(*this, caps, b);
}
- GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override {
- return new GLProcessor();
+ GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const override {
+ return new GLSLProcessor();
}
private:
this->initClassID<GrPathProcessor>();
}
-void GrPathProcessor::getGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrPathProcessor::getGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLPathProcessor::GenKey(*this, caps, b);
}
-GrGLSLPrimitiveProcessor* GrPathProcessor::createGLInstance(const GrGLSLCaps& caps) const {
+GrGLSLPrimitiveProcessor* GrPathProcessor::createGLSLInstance(const GrGLSLCaps& caps) const {
SkASSERT(caps.pathRenderingSupport());
return new GrGLPathProcessor();
}
bool willUseGeoShader() const override { return false; }
- virtual void getGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override;
+ virtual void getGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const override;
- virtual GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps& caps) const override;
+ virtual GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps& caps) const override;
bool hasTransformedLocalCoords() const override { return false; }
*
* TODO: A better name for this function would be "compute" instead of "get".
*/
- virtual void getGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const = 0;
+ virtual void getGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const = 0;
/** Returns a new instance of the appropriate *GL* implementation class
for the given GrProcessor; caller is responsible for deleting
the object. */
- virtual GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps& caps) const = 0;
+ virtual GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps& caps) const = 0;
bool isPathRendering() const { return fIsPathRendering; }
}
}
-void GrXferProcessor::getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
+void GrXferProcessor::getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
uint32_t key = this->willReadDstColor() ? 0x1 : 0x0;
if (key) {
if (const GrTexture* dstTexture = this->getDstTexture()) {
}
}
b->add32(key);
- this->onGetGLProcessorKey(caps, b);
+ this->onGetGLSLProcessorKey(caps, b);
}
GrXferBarrierType GrXferProcessor::xferBarrierType(const GrRenderTarget* rt,
const SkMatrix& localMatrix() const { return fLocalMatrix; }
bool usesLocalCoords() const { return fUsesLocalCoords; }
- class GLProcessor : public GrGLSLGeometryProcessor {
+ class GLSLProcessor : public GrGLSLGeometryProcessor {
public:
- GLProcessor()
+ GLSLProcessor()
: fColor(GrColor_ILLEGAL) {}
void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override {
typedef GrGLSLGeometryProcessor INHERITED;
};
- void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
- GLProcessor::GenKey(*this, caps, b);
+ void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
+ GLSLProcessor::GenKey(*this, caps, b);
}
- GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override {
- return new GLProcessor();
+ GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const override {
+ return new GLSLProcessor();
}
private:
GrConicEffect::~GrConicEffect() {}
-void GrConicEffect::getGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrConicEffect::getGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLConicEffect::GenKey(*this, caps, b);
}
-GrGLSLPrimitiveProcessor* GrConicEffect::createGLInstance(const GrGLSLCaps&) const {
+GrGLSLPrimitiveProcessor* GrConicEffect::createGLSLInstance(const GrGLSLCaps&) const {
return new GrGLConicEffect(*this);
}
GrQuadEffect::~GrQuadEffect() {}
-void GrQuadEffect::getGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrQuadEffect::getGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLQuadEffect::GenKey(*this, caps, b);
}
-GrGLSLPrimitiveProcessor* GrQuadEffect::createGLInstance(const GrGLSLCaps&) const {
+GrGLSLPrimitiveProcessor* GrQuadEffect::createGLSLInstance(const GrGLSLCaps&) const {
return new GrGLQuadEffect(*this);
}
GrCubicEffect::~GrCubicEffect() {}
-void GrCubicEffect::getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
+void GrCubicEffect::getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
GrGLCubicEffect::GenKey(*this, caps, b);
}
-GrGLSLPrimitiveProcessor* GrCubicEffect::createGLInstance(const GrGLSLCaps&) const {
+GrGLSLPrimitiveProcessor* GrCubicEffect::createGLSLInstance(const GrGLSLCaps&) const {
return new GrGLCubicEffect(*this);
}
bool usesLocalCoords() const { return fUsesLocalCoords; }
uint8_t coverageScale() const { return fCoverageScale; }
- void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
- GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override;
+ GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const override;
private:
GrConicEffect(GrColor, const SkMatrix& viewMatrix, uint8_t coverage, GrPrimitiveEdgeType,
bool usesLocalCoords() const { return fUsesLocalCoords; }
uint8_t coverageScale() const { return fCoverageScale; }
- void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
- GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override;
+ GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const override;
private:
GrQuadEffect(GrColor, const SkMatrix& viewMatrix, uint8_t coverage, GrPrimitiveEdgeType,
bool colorIgnored() const { return GrColor_ILLEGAL == fColor; }
const SkMatrix& viewMatrix() const { return fViewMatrix; }
- void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
- GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override;
+ GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const override;
private:
GrCubicEffect(GrColor, const SkMatrix& viewMatrix, GrPrimitiveEdgeType);
GrBicubicEffect::~GrBicubicEffect() {
}
-void GrBicubicEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrBicubicEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLBicubicEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* GrBicubicEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrBicubicEffect::onCreateGLSLInstance() const {
return new GrGLBicubicEffect(*this);
}
GrBicubicEffect(GrTexture*, const SkScalar coefficients[16], const SkMatrix &matrix,
const SkRect& domain);
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
this->addTextureAccess(&fTextureAccess);
}
-void GrBitmapTextGeoProc::getGLProcessorKey(const GrGLSLCaps& caps,GrProcessorKeyBuilder* b) const {
+void GrBitmapTextGeoProc::getGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLBitmapTextGeoProc::GenKey(*this, caps, b);
}
-GrGLSLPrimitiveProcessor* GrBitmapTextGeoProc::createGLInstance(const GrGLSLCaps& caps) const {
+GrGLSLPrimitiveProcessor* GrBitmapTextGeoProc::createGLSLInstance(const GrGLSLCaps& caps) const {
return new GrGLBitmapTextGeoProc();
}
const SkMatrix& localMatrix() const { return fLocalMatrix; }
bool usesLocalCoords() const { return fUsesLocalCoords; }
- void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
- GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps& caps) const override;
+ GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps& caps) const override;
private:
GrBitmapTextGeoProc(GrColor, GrTexture* texture, const GrTextureParams& params,
///////////////////////////////////////////////////////////////////////////////
-void GrConfigConversionEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrConfigConversionEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLConfigConversionEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* GrConfigConversionEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrConfigConversionEffect::onCreateGLSLInstance() const {
return new GrGLConfigConversionEffect(*this);
}
PMConversion pmConversion,
const SkMatrix& matrix);
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
}
}
-void GrConstColorProcessor::onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder* b) const {
+void GrConstColorProcessor::onGetGLSLProcessorKey(const GrGLSLCaps&,
+ GrProcessorKeyBuilder* b) const {
b->add32(fMode);
}
-GrGLSLFragmentProcessor* GrConstColorProcessor::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrConstColorProcessor::onCreateGLSLInstance() const {
return new GLConstColorProcessor;
}
const char* name() const override { return "AARect"; }
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
private:
AARectEffect(GrPrimitiveEdgeType edgeType, const SkRect& rect)
this->setWillReadFragmentPosition();
}
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
bool onIsEqual(const GrFragmentProcessor& other) const override {
const AARectEffect& aare = other.cast<AARectEffect>();
b->add32(aare.getEdgeType());
}
-void AARectEffect::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
+void AARectEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
GLAARectEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* AARectEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* AARectEffect::onCreateGLSLInstance() const {
return new GLAARectEffect(*this);
}
inout->mulByUnknownSingleComponent();
}
-void GrConvexPolyEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrConvexPolyEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLConvexPolyEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* GrConvexPolyEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrConvexPolyEffect::onCreateGLSLInstance() const {
return new GrGLConvexPolyEffect(*this);
}
private:
GrConvexPolyEffect(GrPrimitiveEdgeType edgeType, int n, const SkScalar edges[]);
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor& other) const override;
GrConvolutionEffect::~GrConvolutionEffect() {
}
-void GrConvolutionEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrConvolutionEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLConvolutionEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* GrConvolutionEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrConvolutionEffect::onCreateGLSLInstance() const {
return new GrGLConvolutionEffect(*this);
}
bool useBounds,
float bounds[2]);
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
const char* name() const override { return "Coverage Set Op"; }
- GrGLSLXferProcessor* createGLInstance() const override;
+ GrGLSLXferProcessor* createGLSLInstance() const override;
bool invertCoverage() const { return fInvertCoverage; }
GrColor* color,
const GrCaps& caps) override;
- void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override;
CoverageSetOpXP::~CoverageSetOpXP() {
}
-void CoverageSetOpXP::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
+void CoverageSetOpXP::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GLCoverageSetOpXP::GenKey(*this, caps, b);
}
-GrGLSLXferProcessor* CoverageSetOpXP::createGLInstance() const {
+GrGLSLXferProcessor* CoverageSetOpXP::createGLSLInstance() const {
return new GLCoverageSetOpXP(*this);
}
const char* name() const override { return "Custom Xfermode"; }
- GrGLSLXferProcessor* createGLInstance() const override;
+ GrGLSLXferProcessor* createGLSLInstance() const override;
SkXfermode::Mode mode() const { return fMode; }
bool hasHWBlendEquation() const { return -1 != static_cast<int>(fHWBlendEquation); }
GrColor* overrideColor,
const GrCaps& caps) override;
- void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
GrXferBarrierType onXferBarrier(const GrRenderTarget*, const GrCaps&) const override;
///////////////////////////////////////////////////////////////////////////////
-void CustomXP::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
+void CustomXP::onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
GLCustomXP::GenKey(*this, caps, b);
}
-GrGLSLXferProcessor* CustomXP::createGLInstance() const {
+GrGLSLXferProcessor* CustomXP::createGLSLInstance() const {
SkASSERT(this->willReadDstColor() != this->hasHWBlendEquation());
return new GLCustomXP(*this);
}
bool usesLocalCoords() const { return fUsesLocalCoords; }
- void getGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder* b) const override;
+ void getGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder* b) const override;
- GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override;
+ GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const override;
private:
DashingCircleEffect(GrColor, DashAAMode aaMode, const SkMatrix& localMatrix,
return new DashingCircleEffect(color, aaMode, localMatrix, usesLocalCoords);
}
-void DashingCircleEffect::getGLProcessorKey(const GrGLSLCaps& caps,GrProcessorKeyBuilder* b) const {
+void DashingCircleEffect::getGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GLDashingCircleEffect::GenKey(*this, caps, b);
}
-GrGLSLPrimitiveProcessor* DashingCircleEffect::createGLInstance(const GrGLSLCaps&) const {
+GrGLSLPrimitiveProcessor* DashingCircleEffect::createGLSLInstance(const GrGLSLCaps&) const {
return new GLDashingCircleEffect();
}
bool usesLocalCoords() const { return fUsesLocalCoords; }
- void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
- GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override;
+ GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const override;
private:
DashingLineEffect(GrColor, DashAAMode aaMode, const SkMatrix& localMatrix,
return new DashingLineEffect(color, aaMode, localMatrix, usesLocalCoords);
}
-void DashingLineEffect::getGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void DashingLineEffect::getGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GLDashingLineEffect::GenKey(*this, caps, b);
}
-GrGLSLPrimitiveProcessor* DashingLineEffect::createGLInstance(const GrGLSLCaps&) const {
+GrGLSLPrimitiveProcessor* DashingLineEffect::createGLSLInstance(const GrGLSLCaps&) const {
return new GLDashingLineEffect();
}
const char* name() const override { return "Disable Color"; }
- GrGLSLXferProcessor* createGLInstance() const override;
+ GrGLSLXferProcessor* createGLSLInstance() const override;
private:
DisableColorXP();
return GrXferProcessor::kIgnoreColor_OptFlag | GrXferProcessor::kIgnoreCoverage_OptFlag;
}
- void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override;
this->initClassID<DisableColorXP>();
}
-void DisableColorXP::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
+void DisableColorXP::onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
GLDisableColorXP::GenKey(*this, caps, b);
}
-GrGLSLXferProcessor* DisableColorXP::createGLInstance() const { return new GLDisableColorXP(*this); }
+GrGLSLXferProcessor* DisableColorXP::createGLSLInstance() const { return new GLDisableColorXP(*this); }
void DisableColorXP::onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const {
blendInfo->fWriteColor = false;
this->addTextureAccess(&fTextureAccess);
}
-void GrDistanceFieldA8TextGeoProc::getGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrDistanceFieldA8TextGeoProc::getGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLDistanceFieldA8TextGeoProc::GenKey(*this, caps, b);
}
-GrGLSLPrimitiveProcessor* GrDistanceFieldA8TextGeoProc::createGLInstance(const GrGLSLCaps&) const {
+GrGLSLPrimitiveProcessor* GrDistanceFieldA8TextGeoProc::createGLSLInstance(const GrGLSLCaps&) const {
return new GrGLDistanceFieldA8TextGeoProc();
}
this->addTextureAccess(&fTextureAccess);
}
-void GrDistanceFieldPathGeoProc::getGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrDistanceFieldPathGeoProc::getGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLDistanceFieldPathGeoProc::GenKey(*this, caps, b);
}
-GrGLSLPrimitiveProcessor* GrDistanceFieldPathGeoProc::createGLInstance(const GrGLSLCaps&) const {
+GrGLSLPrimitiveProcessor* GrDistanceFieldPathGeoProc::createGLSLInstance(const GrGLSLCaps&) const {
return new GrGLDistanceFieldPathGeoProc();
}
this->addTextureAccess(&fTextureAccess);
}
-void GrDistanceFieldLCDTextGeoProc::getGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrDistanceFieldLCDTextGeoProc::getGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLDistanceFieldLCDTextGeoProc::GenKey(*this, caps, b);
}
-GrGLSLPrimitiveProcessor* GrDistanceFieldLCDTextGeoProc::createGLInstance(const GrGLSLCaps&) const {
+GrGLSLPrimitiveProcessor* GrDistanceFieldLCDTextGeoProc::createGLSLInstance(const GrGLSLCaps&) const {
return new GrGLDistanceFieldLCDTextGeoProc();
}
#endif
uint32_t getFlags() const { return fFlags; }
- void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
- GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override;
+ GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const override;
private:
GrDistanceFieldA8TextGeoProc(GrColor, const SkMatrix& viewMatrix,
uint32_t getFlags() const { return fFlags; }
bool usesLocalCoords() const { return fUsesLocalCoords; }
- void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
- GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override;
+ GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const override;
private:
GrDistanceFieldPathGeoProc(GrColor, const SkMatrix& viewMatrix, GrTexture* texture,
uint32_t getFlags() const { return fFlags; }
bool usesLocalCoords() const { return fUsesLocalCoords; }
- void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void getGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
- GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override;
+ GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) const override;
private:
GrDistanceFieldLCDTextGeoProc(GrColor, const SkMatrix& viewMatrix,
this->setWillReadFragmentPosition();
}
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
// All dither effects are equal
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
//////////////////////////////////////////////////////////////////////////////
-void DitherEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void DitherEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GLDitherEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* DitherEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* DitherEffect::onCreateGLSLInstance() const {
return new GLDitherEffect(*this);
}
GrMatrixConvolutionEffect::~GrMatrixConvolutionEffect() {
}
-void GrMatrixConvolutionEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrMatrixConvolutionEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLMatrixConvolutionEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* GrMatrixConvolutionEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrMatrixConvolutionEffect::onCreateGLSLInstance() const {
return new GrGLMatrixConvolutionEffect(*this);
}
GrTextureDomain::Mode tileMode,
bool convolveAlpha);
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
private:
CircleEffect(GrPrimitiveEdgeType, const SkPoint& center, SkScalar radius);
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
///////////////////////////////////////////////////////////////////////////////////////////////////
-void CircleEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void CircleEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GLCircleEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* CircleEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* CircleEffect::onCreateGLSLInstance() const {
return new GLCircleEffect(*this);
}
private:
EllipseEffect(GrPrimitiveEdgeType, const SkPoint& center, SkScalar rx, SkScalar ry);
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
///////////////////////////////////////////////////////////////////////////////////////////////////
-void EllipseEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void EllipseEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GLEllipseEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* EllipseEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* EllipseEffect::onCreateGLSLInstance() const {
return new GLEllipseEffect(*this);
}
const char* name() const override { return "Porter Duff"; }
- GrGLSLXferProcessor* createGLInstance() const override;
+ GrGLSLXferProcessor* createGLSLInstance() const override;
BlendFormula getBlendFormula() const { return fBlendFormula; }
GrColor* overrideColor,
const GrCaps& caps) override;
- void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
bool onHasSecondaryOutput() const override { return fBlendFormula.hasSecondaryOutput(); }
///////////////////////////////////////////////////////////////////////////////
-void PorterDuffXferProcessor::onGetGLProcessorKey(const GrGLSLCaps&,
- GrProcessorKeyBuilder* b) const {
+void PorterDuffXferProcessor::onGetGLSLProcessorKey(const GrGLSLCaps&,
+ GrProcessorKeyBuilder* b) const {
GLPorterDuffXferProcessor::GenKey(*this, b);
}
-GrGLSLXferProcessor* PorterDuffXferProcessor::createGLInstance() const {
+GrGLSLXferProcessor* PorterDuffXferProcessor::createGLSLInstance() const {
return new GLPorterDuffXferProcessor;
}
const char* name() const override { return "Porter Duff Shader"; }
- GrGLSLXferProcessor* createGLInstance() const override;
+ GrGLSLXferProcessor* createGLSLInstance() const override;
SkXfermode::Mode getXfermode() const { return fXfermode; }
return kNone_OptFlags;
}
- void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
bool onIsEqual(const GrXferProcessor& xpBase) const override {
const ShaderPDXferProcessor& xp = xpBase.cast<ShaderPDXferProcessor>();
///////////////////////////////////////////////////////////////////////////////
-void ShaderPDXferProcessor::onGetGLProcessorKey(const GrGLSLCaps&,
- GrProcessorKeyBuilder* b) const {
+void ShaderPDXferProcessor::onGetGLSLProcessorKey(const GrGLSLCaps&,
+ GrProcessorKeyBuilder* b) const {
GLShaderPDXferProcessor::GenKey(*this, b);
}
-GrGLSLXferProcessor* ShaderPDXferProcessor::createGLInstance() const {
+GrGLSLXferProcessor* ShaderPDXferProcessor::createGLSLInstance() const {
return new GLShaderPDXferProcessor;
}
const char* name() const override { return "Porter Duff LCD"; }
- GrGLSLXferProcessor* createGLInstance() const override;
+ GrGLSLXferProcessor* createGLSLInstance() const override;
private:
PDLCDXferProcessor(GrColor blendConstant, uint8_t alpha);
GrColor* overrideColor,
const GrCaps& caps) override;
- void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override;
void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override {
blendInfo->fSrcBlend = kConstC_GrBlendCoeff;
PDLCDXferProcessor::~PDLCDXferProcessor() {
}
-void PDLCDXferProcessor::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void PDLCDXferProcessor::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GLPDLCDXferProcessor::GenKey(*this, caps, b);
}
-GrGLSLXferProcessor* PDLCDXferProcessor::createGLInstance() const {
+GrGLSLXferProcessor* PDLCDXferProcessor::createGLSLInstance() const {
return new GLPDLCDXferProcessor(*this);
}
private:
CircularRRectEffect(GrPrimitiveEdgeType, uint32_t circularCornerFlags, const SkRRect&);
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor& other) const override;
////////////////////////////////////////////////////////////////////////////////////////////////////
-void CircularRRectEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void CircularRRectEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GLCircularRRectEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* CircularRRectEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* CircularRRectEffect::onCreateGLSLInstance() const {
return new GLCircularRRectEffect(*this);
}
private:
EllipticalRRectEffect(GrPrimitiveEdgeType, const SkRRect&);
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor& other) const override;
////////////////////////////////////////////////////////////////////////////////////////////////////
-void EllipticalRRectEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void EllipticalRRectEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GLEllipticalRRectEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* EllipticalRRectEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* EllipticalRRectEffect::onCreateGLSLInstance() const {
return new GLEllipticalRRectEffect(*this);
}
this->updateInvariantOutputForModulation(inout);
}
-void GrSimpleTextureEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrSimpleTextureEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLSimpleTextureEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* GrSimpleTextureEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrSimpleTextureEffect::onCreateGLSLInstance() const {
return new GrGLSimpleTextureEffect(*this);
}
this->initClassID<GrSimpleTextureEffect>();
}
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor& other) const override { return true; }
GrTextureDomainEffect::~GrTextureDomainEffect() {}
-void GrTextureDomainEffect::onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const {
+void GrTextureDomainEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
GrGLTextureDomainEffect::GenKey(*this, caps, b);
}
-GrGLSLFragmentProcessor* GrTextureDomainEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrTextureDomainEffect::onCreateGLSLInstance() const {
return new GrGLTextureDomainEffect(*this);
}
GrTextureParams::FilterMode,
GrCoordSet);
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
- void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
+ void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
bool onIsEqual(const GrFragmentProcessor&) const override;
const char* name() const override { return "ComposeTwo"; }
- void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
b->add32(fMode);
}
}
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
SkXfermode::Mode fMode;
return new ComposeTwoFragmentProcessor(fpA, fpB, mode);
}
-GrGLSLFragmentProcessor* ComposeTwoFragmentProcessor::onCreateGLInstance() const{
+GrGLSLFragmentProcessor* ComposeTwoFragmentProcessor::onCreateGLSLInstance() const{
return new GLComposeTwoFragmentProcessor(*this);
}
const char* name() const override { return "ComposeOne"; }
- void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
GR_STATIC_ASSERT((SkXfermode::kLastMode & SK_MaxU16) == SkXfermode::kLastMode);
b->add32(fMode | (fChild << 16));
}
}
private:
- GrGLSLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
SkXfermode::Mode fMode;
Child fChild;
return new ComposeOneFragmentProcessor(dst, mode, child);
}
-GrGLSLFragmentProcessor* ComposeOneFragmentProcessor::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* ComposeOneFragmentProcessor::onCreateGLSLInstance() const {
return new GLComposeOneFragmentProcessor(*this);
}
return fColorSpace;
}
- class GLProcessor : public GrGLSLFragmentProcessor {
+ class GLSLProcessor : public GrGLSLFragmentProcessor {
public:
static const float kJPEGConversionMatrix[16];
static const float kRec601ConversionMatrix[16];
// this class always generates the same code.
static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder*) {}
- GLProcessor(const GrProcessor&) {}
+ GLSLProcessor(const GrProcessor&) {}
virtual void emitCode(EmitArgs& args) override {
GrGLSLFragmentBuilder* fsBuilder = args.fBuilder->getFragmentShaderBuilder();
this->addTextureAccess(&fVAccess);
}
- GrGLSLFragmentProcessor* onCreateGLInstance() const override { return new GLProcessor(*this); }
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
+ return new GLSLProcessor(*this);
+ }
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override {
- GLProcessor::GenKey(*this, caps, b);
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const override {
+ GLSLProcessor::GenKey(*this, caps, b);
}
bool onIsEqual(const GrFragmentProcessor& sBase) const override {
typedef GrFragmentProcessor INHERITED;
};
-const float YUVtoRGBEffect::GLProcessor::kJPEGConversionMatrix[16] = {
+const float YUVtoRGBEffect::GLSLProcessor::kJPEGConversionMatrix[16] = {
1.0f, 0.0f, 1.402f, -0.701f,
1.0f, -0.34414f, -0.71414f, 0.529f,
1.0f, 1.772f, 0.0f, -0.886f,
0.0f, 0.0f, 0.0f, 1.0};
-const float YUVtoRGBEffect::GLProcessor::kRec601ConversionMatrix[16] = {
+const float YUVtoRGBEffect::GLSLProcessor::kRec601ConversionMatrix[16] = {
1.164f, 0.0f, 1.596f, -0.87075f,
1.164f, -0.391f, -0.813f, 0.52925f,
1.164f, 2.018f, 0.0f, -1.08175f,
0.0f, 0.0f, 0.0f, 1.0};
-const float YUVtoRGBEffect::GLProcessor::kRec709ConversionMatrix[16] = {
+const float YUVtoRGBEffect::GLSLProcessor::kRec709ConversionMatrix[16] = {
1.164f, 0.0f, 1.793f, -0.96925f,
1.164f, -0.213f, -0.533f, 0.30025f,
1.164f, 2.112f, 0.0f, -1.12875f,
}
}
- fp.getGLProcessorKey(*caps.glslCaps(), b);
+ fp.getGLSLProcessorKey(*caps.glslCaps(), b);
//**** use glslCaps here?
return get_meta_key(fp, caps, primProc.getTransformKey(fp.coordTransforms(),
GrProcessorKeyBuilder b(&glDesc->key());
- primProc.getGLProcessorKey(*gpu->glCaps().glslCaps(), &b);
+ primProc.getGLSLProcessorKey(*gpu->glCaps().glslCaps(), &b);
//**** use glslCaps here?
if (!get_meta_key(primProc, gpu->glCaps(), 0, &b)) {
glDesc->key().reset();
}
const GrXferProcessor& xp = *pipeline.getXferProcessor();
- xp.getGLProcessorKey(*gpu->glCaps().glslCaps(), &b);
+ xp.getGLSLProcessorKey(*gpu->glCaps().glslCaps(), &b);
//**** use glslCaps here?
if (!get_meta_key(xp, gpu->glCaps(), 0, &b)) {
glDesc->key().reset();
const char* inColor) {
GrGLInstalledFragProc* ifp = new GrGLInstalledFragProc;
- ifp->fGLProc.reset(fp.createGLInstance());
+ ifp->fGLProc.reset(fp.createGLSLInstance());
SkSTArray<4, GrGLSLTextureSampler> samplers(fp.numTextures());
this->emitSamplers(fp, &samplers, ifp);
SkASSERT(!fGeometryProcessor);
fGeometryProcessor = new GrGLInstalledGeoProc;
- fGeometryProcessor->fGLProc.reset(gp.createGLInstance(*fGpu->glCaps().glslCaps()));
+ fGeometryProcessor->fGLProc.reset(gp.createGLSLInstance(*fGpu->glCaps().glslCaps()));
SkSTArray<4, GrGLSLTextureSampler> samplers(gp.numTextures());
this->emitSamplers(gp, &samplers, fGeometryProcessor);
SkASSERT(!fXferProcessor);
fXferProcessor = new GrGLInstalledXferProc;
- fXferProcessor->fGLProc.reset(xp.createGLInstance());
+ fXferProcessor->fGLProc.reset(xp.createGLSLInstance());
// Enable dual source secondary output if we have one
if (xp.hasSecondaryOutput()) {
const char* getPrimaryColorOutputName() const;
const char* getSecondaryColorOutputName() const;
- // As GLProcessors emit code, there are some conditions we need to verify. We use the below
+ // As GLSLProcessors emit code, there are some conditions we need to verify. We use the below
// state to track this. The reset call is called per processor emitted.
bool hasReadDstColor() const { return fHasReadDstColor; }
bool hasReadFragmentPosition() const { return fHasReadFragmentPosition; }
GrSLType coordType = kVec2f_GrSLType);
/**
- * Called by GrGLProcessors to add code to one of the shaders.
+ * Called by GrGLSLProcessors to add code to one of the shaders.
*/
void codeAppendf(const char format[], ...) SK_PRINTF_LIKE(2, 3) {
va_list args;
const char* name() const override { return "Big Ole Key"; }
- GrGLSLFragmentProcessor* onCreateGLInstance() const override {
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
return new GLBigKeyProcessor(*this);
}
BigKeyProcessor() {
this->initClassID<BigKeyProcessor>();
}
- virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override {
+ virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
+ GrProcessorKeyBuilder* b) const override {
GLBigKeyProcessor::GenKey(*this, caps, b);
}
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }
const char* name() const override { return "Block Input"; }
- GrGLSLFragmentProcessor* onCreateGLInstance() const override { return new GLFP; }
+ GrGLSLFragmentProcessor* onCreateGLSLInstance() const override { return new GLFP; }
private:
class GLFP : public GrGLSLFragmentProcessor {
this->registerChildProcessor(child);
}
- void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {}
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {}
bool onIsEqual(const GrFragmentProcessor&) const override { return true; }