Make all GrFragmentProcessors GL independent.
TBR=bsalomon@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1434313002
diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp
index febf18f..d57861d 100644
--- a/src/gpu/effects/GrBezierEffect.cpp
+++ b/src/gpu/effects/GrBezierEffect.cpp
@@ -7,11 +7,11 @@
#include "GrBezierEffect.h"
-#include "gl/GrGLFragmentProcessor.h"
#include "gl/GrGLGeometryProcessor.h"
-#include "gl/GrGLUtil.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
+#include "glsl/GrGLSLUtil.h"
class GrGLConicEffect : public GrGLGeometryProcessor {
public:
@@ -30,7 +30,7 @@
if (!ce.viewMatrix().isIdentity() && !fViewMatrix.cheapEqualTo(ce.viewMatrix())) {
fViewMatrix = ce.viewMatrix();
float viewMatrix[3 * 3];
- GrGLGetMatrix<3>(viewMatrix, fViewMatrix);
+ GrGLSLGetMatrix<3>(viewMatrix, fViewMatrix);
pdman.setMatrix3f(fViewMatrixUniform, viewMatrix);
}
@@ -246,7 +246,7 @@
if (!qe.viewMatrix().isIdentity() && !fViewMatrix.cheapEqualTo(qe.viewMatrix())) {
fViewMatrix = qe.viewMatrix();
float viewMatrix[3 * 3];
- GrGLGetMatrix<3>(viewMatrix, fViewMatrix);
+ GrGLSLGetMatrix<3>(viewMatrix, fViewMatrix);
pdman.setMatrix3f(fViewMatrixUniform, viewMatrix);
}
@@ -448,7 +448,7 @@
if (!ce.viewMatrix().isIdentity() && !fViewMatrix.cheapEqualTo(ce.viewMatrix())) {
fViewMatrix = ce.viewMatrix();
float viewMatrix[3 * 3];
- GrGLGetMatrix<3>(viewMatrix, fViewMatrix);
+ GrGLSLGetMatrix<3>(viewMatrix, fViewMatrix);
pdman.setMatrix3f(fViewMatrixUniform, viewMatrix);
}
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp
index 2857641..dedb927 100644
--- a/src/gpu/effects/GrBicubicEffect.cpp
+++ b/src/gpu/effects/GrBicubicEffect.cpp
@@ -21,7 +21,7 @@
};
-class GrGLBicubicEffect : public GrGLFragmentProcessor {
+class GrGLBicubicEffect : public GrGLSLFragmentProcessor {
public:
GrGLBicubicEffect(const GrProcessor&);
@@ -43,7 +43,7 @@
UniformHandle fImageIncrementUni;
GrTextureDomain::GLDomain fDomain;
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
GrGLBicubicEffect::GrGLBicubicEffect(const GrProcessor&) {
@@ -157,7 +157,7 @@
GrGLBicubicEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* GrBicubicEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrBicubicEffect::onCreateGLInstance() const {
return new GrGLBicubicEffect(*this);
}
diff --git a/src/gpu/effects/GrBicubicEffect.h b/src/gpu/effects/GrBicubicEffect.h
index 5a54cc1..67569d8 100644
--- a/src/gpu/effects/GrBicubicEffect.h
+++ b/src/gpu/effects/GrBicubicEffect.h
@@ -10,7 +10,7 @@
#include "GrSingleTextureEffect.h"
#include "GrTextureDomain.h"
-#include "gl/GrGLFragmentProcessor.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
class GrGLBicubicEffect;
class GrInvariantOutput;
@@ -87,7 +87,7 @@
GrBicubicEffect(GrTexture*, const SkScalar coefficients[16], const SkMatrix &matrix,
const SkRect& domain);
- GrGLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override;
void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
index 21dd5e7..7b17924 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
@@ -8,9 +8,8 @@
#include "GrBitmapTextGeoProc.h"
#include "GrInvariantOutput.h"
#include "GrTexture.h"
-#include "gl/GrGLFragmentProcessor.h"
-#include "gl/GrGLTexture.h"
#include "gl/GrGLGeometryProcessor.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index 160773d..0273858 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -11,11 +11,11 @@
#include "GrInvariantOutput.h"
#include "GrSimpleTextureEffect.h"
#include "SkMatrix.h"
-#include "gl/GrGLFragmentProcessor.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
-class GrGLConfigConversionEffect : public GrGLFragmentProcessor {
+class GrGLConfigConversionEffect : public GrGLSLFragmentProcessor {
public:
GrGLConfigConversionEffect(const GrProcessor& processor) {
const GrConfigConversionEffect& configConversionEffect =
@@ -91,7 +91,7 @@
bool fSwapRedAndBlue;
GrConfigConversionEffect::PMConversion fPMConversion;
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
@@ -147,7 +147,7 @@
GrGLConfigConversionEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* GrConfigConversionEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrConfigConversionEffect::onCreateGLInstance() const {
return new GrGLConfigConversionEffect(*this);
}
diff --git a/src/gpu/effects/GrConfigConversionEffect.h b/src/gpu/effects/GrConfigConversionEffect.h
index cf2fea3..bf13afb 100644
--- a/src/gpu/effects/GrConfigConversionEffect.h
+++ b/src/gpu/effects/GrConfigConversionEffect.h
@@ -56,7 +56,7 @@
PMConversion pmConversion,
const SkMatrix& matrix);
- GrGLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override;
void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
diff --git a/src/gpu/effects/GrConstColorProcessor.cpp b/src/gpu/effects/GrConstColorProcessor.cpp
index 5440dd3..09aa75d 100644
--- a/src/gpu/effects/GrConstColorProcessor.cpp
+++ b/src/gpu/effects/GrConstColorProcessor.cpp
@@ -6,12 +6,12 @@
*/
#include "effects/GrConstColorProcessor.h"
-#include "gl/GrGLFragmentProcessor.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
-class GLConstColorProcessor : public GrGLFragmentProcessor {
+class GLConstColorProcessor : public GrGLSLFragmentProcessor {
public:
GLConstColorProcessor() : fPrevColor(GrColor_ILLEGAL) {}
@@ -63,7 +63,7 @@
GrGLSLProgramDataManager::UniformHandle fColorUniform;
GrColor fPrevColor;
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
@@ -96,7 +96,7 @@
b->add32(fMode);
}
-GrGLFragmentProcessor* GrConstColorProcessor::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrConstColorProcessor::onCreateGLInstance() const {
return new GLConstColorProcessor;
}
diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp
index c373b04..3beecb4 100644
--- a/src/gpu/effects/GrConvexPolyEffect.cpp
+++ b/src/gpu/effects/GrConvexPolyEffect.cpp
@@ -8,8 +8,7 @@
#include "GrConvexPolyEffect.h"
#include "GrInvariantOutput.h"
#include "SkPathPriv.h"
-#include "gl/GrGLContext.h"
-#include "gl/GrGLFragmentProcessor.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
@@ -36,7 +35,7 @@
this->setWillReadFragmentPosition();
}
- GrGLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override;
bool onIsEqual(const GrFragmentProcessor& other) const override {
const AARectEffect& aare = other.cast<AARectEffect>();
@@ -80,7 +79,7 @@
//////////////////////////////////////////////////////////////////////////////
-class GLAARectEffect : public GrGLFragmentProcessor {
+class GLAARectEffect : public GrGLSLFragmentProcessor {
public:
GLAARectEffect(const GrProcessor&);
@@ -94,7 +93,7 @@
private:
GrGLSLProgramDataManager::UniformHandle fRectUniform;
SkRect fPrevRect;
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
GLAARectEffect::GLAARectEffect(const GrProcessor& effect) {
@@ -161,13 +160,13 @@
GLAARectEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* AARectEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* AARectEffect::onCreateGLInstance() const {
return new GLAARectEffect(*this);
}
//////////////////////////////////////////////////////////////////////////////
-class GrGLConvexPolyEffect : public GrGLFragmentProcessor {
+class GrGLConvexPolyEffect : public GrGLSLFragmentProcessor {
public:
GrGLConvexPolyEffect(const GrProcessor&);
@@ -181,7 +180,7 @@
private:
GrGLSLProgramDataManager::UniformHandle fEdgeUniform;
SkScalar fPrevEdges[3 * GrConvexPolyEffect::kMaxEdges];
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
GrGLConvexPolyEffect::GrGLConvexPolyEffect(const GrProcessor&) {
@@ -309,7 +308,7 @@
GrGLConvexPolyEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* GrConvexPolyEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrConvexPolyEffect::onCreateGLInstance() const {
return new GrGLConvexPolyEffect(*this);
}
diff --git a/src/gpu/effects/GrConvexPolyEffect.h b/src/gpu/effects/GrConvexPolyEffect.h
index 9e7f154..6622ca3 100644
--- a/src/gpu/effects/GrConvexPolyEffect.h
+++ b/src/gpu/effects/GrConvexPolyEffect.h
@@ -72,7 +72,7 @@
private:
GrConvexPolyEffect(GrPrimitiveEdgeType edgeType, int n, const SkScalar edges[]);
- GrGLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override;
void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
diff --git a/src/gpu/effects/GrConvolutionEffect.cpp b/src/gpu/effects/GrConvolutionEffect.cpp
index 5367b27..55b44b7 100644
--- a/src/gpu/effects/GrConvolutionEffect.cpp
+++ b/src/gpu/effects/GrConvolutionEffect.cpp
@@ -6,8 +6,7 @@
*/
#include "GrConvolutionEffect.h"
-#include "gl/GrGLFragmentProcessor.h"
-#include "gl/GrGLTexture.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
@@ -15,7 +14,7 @@
// For brevity
typedef GrGLSLProgramDataManager::UniformHandle UniformHandle;
-class GrGLConvolutionEffect : public GrGLFragmentProcessor {
+class GrGLConvolutionEffect : public GrGLSLFragmentProcessor {
public:
GrGLConvolutionEffect(const GrProcessor&);
@@ -38,7 +37,7 @@
UniformHandle fImageIncrementUni;
UniformHandle fBoundsUni;
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
GrGLConvolutionEffect::GrGLConvolutionEffect(const GrProcessor& processor) {
@@ -200,7 +199,7 @@
GrGLConvolutionEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* GrConvolutionEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrConvolutionEffect::onCreateGLInstance() const {
return new GrGLConvolutionEffect(*this);
}
diff --git a/src/gpu/effects/GrConvolutionEffect.h b/src/gpu/effects/GrConvolutionEffect.h
index 9db173a..0396415 100644
--- a/src/gpu/effects/GrConvolutionEffect.h
+++ b/src/gpu/effects/GrConvolutionEffect.h
@@ -80,7 +80,7 @@
bool useBounds,
float bounds[2]);
- GrGLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override;
void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp
index 574310c..e54627c 100644
--- a/src/gpu/effects/GrCustomXfermode.cpp
+++ b/src/gpu/effects/GrCustomXfermode.cpp
@@ -15,12 +15,10 @@
#include "GrTexture.h"
#include "GrTextureAccess.h"
#include "SkXfermode.h"
-#include "gl/GrGLCaps.h"
-#include "gl/GrGLGpu.h"
-#include "gl/GrGLSLBlend.h"
-#include "gl/GrGLFragmentProcessor.h"
-#include "gl/GrGLProgramDataManager.h"
+#include "gl/GrGLXferProcessor.h"
+#include "glsl/GrGLSLBlend.h"
#include "glsl/GrGLSLCaps.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp
index 3fa3014..612e976 100644
--- a/src/gpu/effects/GrDashingEffect.cpp
+++ b/src/gpu/effects/GrDashingEffect.cpp
@@ -22,7 +22,7 @@
#include "SkGr.h"
#include "batches/GrVertexBatch.h"
#include "gl/GrGLGeometryProcessor.h"
-#include "gl/GrGLFragmentProcessor.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
index 90a0898..a43171a 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
@@ -11,13 +11,13 @@
#include "SkDistanceFieldGen.h"
-#include "gl/GrGLFragmentProcessor.h"
-#include "gl/GrGLTexture.h"
#include "gl/GrGLGeometryProcessor.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
#include "glsl/GrGLSLVertexShaderBuilder.h"
+#include "glsl/GrGLSLUtil.h"
// Assuming a radius of a little less than the diagonal of the fragment
#define SK_DistanceFieldAAFactor "0.65"
@@ -160,7 +160,7 @@
if (!dfa8gp.viewMatrix().isIdentity() && !fViewMatrix.cheapEqualTo(dfa8gp.viewMatrix())) {
fViewMatrix = dfa8gp.viewMatrix();
float viewMatrix[3 * 3];
- GrGLGetMatrix<3>(viewMatrix, fViewMatrix);
+ GrGLSLGetMatrix<3>(viewMatrix, fViewMatrix);
pdman.setMatrix3f(fViewMatrixUniform, viewMatrix);
}
@@ -390,7 +390,7 @@
if (!dfpgp.viewMatrix().isIdentity() && !fViewMatrix.cheapEqualTo(dfpgp.viewMatrix())) {
fViewMatrix = dfpgp.viewMatrix();
float viewMatrix[3 * 3];
- GrGLGetMatrix<3>(viewMatrix, fViewMatrix);
+ GrGLSLGetMatrix<3>(viewMatrix, fViewMatrix);
pdman.setMatrix3f(fViewMatrixUniform, viewMatrix);
}
@@ -659,7 +659,7 @@
if (!dflcd.viewMatrix().isIdentity() && !fViewMatrix.cheapEqualTo(dflcd.viewMatrix())) {
fViewMatrix = dflcd.viewMatrix();
float viewMatrix[3 * 3];
- GrGLGetMatrix<3>(viewMatrix, fViewMatrix);
+ GrGLSLGetMatrix<3>(viewMatrix, fViewMatrix);
pdman.setMatrix3f(fViewMatrixUniform, viewMatrix);
}
diff --git a/src/gpu/effects/GrDitherEffect.cpp b/src/gpu/effects/GrDitherEffect.cpp
index fb02da5..692d873 100644
--- a/src/gpu/effects/GrDitherEffect.cpp
+++ b/src/gpu/effects/GrDitherEffect.cpp
@@ -9,7 +9,7 @@
#include "GrFragmentProcessor.h"
#include "GrInvariantOutput.h"
#include "SkRect.h"
-#include "gl/GrGLFragmentProcessor.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
@@ -31,7 +31,7 @@
this->setWillReadFragmentPosition();
}
- GrGLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override;
void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
@@ -59,14 +59,14 @@
//////////////////////////////////////////////////////////////////////////////
-class GLDitherEffect : public GrGLFragmentProcessor {
+class GLDitherEffect : public GrGLSLFragmentProcessor {
public:
GLDitherEffect(const GrProcessor&);
virtual void emitCode(EmitArgs& args) override;
private:
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
GLDitherEffect::GLDitherEffect(const GrProcessor&) {
@@ -97,7 +97,7 @@
GLDitherEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* DitherEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* DitherEffect::onCreateGLInstance() const {
return new GLDitherEffect(*this);
}
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index 358f808..98611f9 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -5,12 +5,11 @@
* found in the LICENSE file.
*/
#include "GrMatrixConvolutionEffect.h"
-#include "gl/GrGLFragmentProcessor.h"
-#include "gl/GrGLTexture.h"
-#include "gl/builders/GrGLProgramBuilder.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
+#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
-class GrGLMatrixConvolutionEffect : public GrGLFragmentProcessor {
+class GrGLMatrixConvolutionEffect : public GrGLSLFragmentProcessor {
public:
GrGLMatrixConvolutionEffect(const GrProcessor&);
virtual void emitCode(EmitArgs&) override;
@@ -32,7 +31,7 @@
UniformHandle fBiasUni;
GrTextureDomain::GLDomain fDomain;
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
GrGLMatrixConvolutionEffect::GrGLMatrixConvolutionEffect(const GrProcessor& processor) {
@@ -43,18 +42,18 @@
void GrGLMatrixConvolutionEffect::emitCode(EmitArgs& args) {
const GrTextureDomain& domain = args.fFp.cast<GrMatrixConvolutionEffect>().domain();
- fImageIncrementUni = args.fBuilder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
+ fImageIncrementUni = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
kVec2f_GrSLType, kDefault_GrSLPrecision,
"ImageIncrement");
- fKernelUni = args.fBuilder->addUniformArray(GrGLProgramBuilder::kFragment_Visibility,
+ fKernelUni = args.fBuilder->addUniformArray(GrGLSLProgramBuilder::kFragment_Visibility,
kFloat_GrSLType, kDefault_GrSLPrecision,
"Kernel",
fKernelSize.width() * fKernelSize.height());
- fKernelOffsetUni = args.fBuilder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
+ fKernelOffsetUni = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
kVec2f_GrSLType, kDefault_GrSLPrecision, "KernelOffset");
- fGainUni = args.fBuilder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
+ fGainUni = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
kFloat_GrSLType, kDefault_GrSLPrecision, "Gain");
- fBiasUni = args.fBuilder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
+ fBiasUni = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
kFloat_GrSLType, kDefault_GrSLPrecision, "Bias");
const char* kernelOffset = args.fBuilder->getUniformCStr(fKernelOffsetUni);
@@ -161,7 +160,7 @@
GrGLMatrixConvolutionEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* GrMatrixConvolutionEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrMatrixConvolutionEffect::onCreateGLInstance() const {
return new GrGLMatrixConvolutionEffect(*this);
}
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.h b/src/gpu/effects/GrMatrixConvolutionEffect.h
index 3f16edb..6f6ca9d 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.h
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.h
@@ -66,7 +66,7 @@
GrTextureDomain::Mode tileMode,
bool convolveAlpha);
- GrGLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override;
void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
diff --git a/src/gpu/effects/GrOvalEffect.cpp b/src/gpu/effects/GrOvalEffect.cpp
index d34edbb..16e1c09 100644
--- a/src/gpu/effects/GrOvalEffect.cpp
+++ b/src/gpu/effects/GrOvalEffect.cpp
@@ -10,7 +10,7 @@
#include "GrFragmentProcessor.h"
#include "GrInvariantOutput.h"
#include "SkRect.h"
-#include "gl/GrGLFragmentProcessor.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
@@ -33,7 +33,7 @@
private:
CircleEffect(GrPrimitiveEdgeType, const SkPoint& center, SkScalar radius);
- GrGLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override;
void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
@@ -91,7 +91,7 @@
//////////////////////////////////////////////////////////////////////////////
-class GLCircleEffect : public GrGLFragmentProcessor {
+class GLCircleEffect : public GrGLSLFragmentProcessor {
public:
GLCircleEffect(const GrProcessor&);
@@ -107,7 +107,7 @@
SkPoint fPrevCenter;
SkScalar fPrevRadius;
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
GLCircleEffect::GLCircleEffect(const GrProcessor&) {
@@ -179,7 +179,7 @@
GLCircleEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* CircleEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* CircleEffect::onCreateGLInstance() const {
return new GLCircleEffect(*this);
}
@@ -202,7 +202,7 @@
private:
EllipseEffect(GrPrimitiveEdgeType, const SkPoint& center, SkScalar rx, SkScalar ry);
- GrGLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override;
void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
@@ -263,7 +263,7 @@
//////////////////////////////////////////////////////////////////////////////
-class GLEllipseEffect : public GrGLFragmentProcessor {
+class GLEllipseEffect : public GrGLSLFragmentProcessor {
public:
GLEllipseEffect(const GrProcessor&);
@@ -279,7 +279,7 @@
SkPoint fPrevCenter;
SkVector fPrevRadii;
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
GLEllipseEffect::GLEllipseEffect(const GrProcessor& effect) {
@@ -356,7 +356,7 @@
GLEllipseEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* EllipseEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* EllipseEffect::onCreateGLInstance() const {
return new GLEllipseEffect(*this);
}
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
index 650a1e7..78d0f14 100644
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
@@ -13,8 +13,8 @@
#include "GrProcOptInfo.h"
#include "GrTypes.h"
#include "GrXferProcessor.h"
-#include "gl/GrGLSLBlend.h"
#include "gl/GrGLXferProcessor.h"
+#include "glsl/GrGLSLBlend.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
diff --git a/src/gpu/effects/GrRRectEffect.cpp b/src/gpu/effects/GrRRectEffect.cpp
index 398edcc..8b3b83d 100644
--- a/src/gpu/effects/GrRRectEffect.cpp
+++ b/src/gpu/effects/GrRRectEffect.cpp
@@ -12,7 +12,7 @@
#include "GrInvariantOutput.h"
#include "GrOvalEffect.h"
#include "SkRRect.h"
-#include "gl/GrGLFragmentProcessor.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
@@ -60,7 +60,7 @@
private:
CircularRRectEffect(GrPrimitiveEdgeType, uint32_t circularCornerFlags, const SkRRect&);
- GrGLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override;
void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
@@ -126,7 +126,7 @@
//////////////////////////////////////////////////////////////////////////////
-class GLCircularRRectEffect : public GrGLFragmentProcessor {
+class GLCircularRRectEffect : public GrGLSLFragmentProcessor {
public:
GLCircularRRectEffect(const GrProcessor&);
@@ -141,7 +141,7 @@
GrGLSLProgramDataManager::UniformHandle fInnerRectUniform;
GrGLSLProgramDataManager::UniformHandle fRadiusPlusHalfUniform;
SkRRect fPrevRRect;
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
GLCircularRRectEffect::GLCircularRRectEffect(const GrProcessor& ) {
@@ -369,7 +369,7 @@
GLCircularRRectEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* CircularRRectEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* CircularRRectEffect::onCreateGLInstance() const {
return new GLCircularRRectEffect(*this);
}
@@ -390,7 +390,7 @@
private:
EllipticalRRectEffect(GrPrimitiveEdgeType, const SkRRect&);
- GrGLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override;
void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
@@ -472,7 +472,7 @@
//////////////////////////////////////////////////////////////////////////////
-class GLEllipticalRRectEffect : public GrGLFragmentProcessor {
+class GLEllipticalRRectEffect : public GrGLSLFragmentProcessor {
public:
GLEllipticalRRectEffect(const GrProcessor&);
@@ -487,7 +487,7 @@
GrGLSLProgramDataManager::UniformHandle fInnerRectUniform;
GrGLSLProgramDataManager::UniformHandle fInvRadiiSqdUniform;
SkRRect fPrevRRect;
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
GLEllipticalRRectEffect::GLEllipticalRRectEffect(const GrProcessor& effect) {
@@ -620,7 +620,7 @@
GLEllipticalRRectEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* EllipticalRRectEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* EllipticalRRectEffect::onCreateGLInstance() const {
return new GLEllipticalRRectEffect(*this);
}
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index c1bc6df..0b03c99 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -8,13 +8,11 @@
#include "GrSimpleTextureEffect.h"
#include "GrInvariantOutput.h"
#include "GrTexture.h"
-#include "gl/GrGLCaps.h"
-#include "gl/GrGLFragmentProcessor.h"
-#include "gl/GrGLTexture.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
-class GrGLSimpleTextureEffect : public GrGLFragmentProcessor {
+class GrGLSimpleTextureEffect : public GrGLSLFragmentProcessor {
public:
GrGLSimpleTextureEffect(const GrProcessor&) {}
@@ -29,7 +27,7 @@
}
private:
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
///////////////////////////////////////////////////////////////////////////////
@@ -43,7 +41,7 @@
GrGLSimpleTextureEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* GrSimpleTextureEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrSimpleTextureEffect::onCreateGLInstance() const {
return new GrGLSimpleTextureEffect(*this);
}
diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h
index 4e5b421..e421162 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.h
+++ b/src/gpu/effects/GrSimpleTextureEffect.h
@@ -63,7 +63,7 @@
this->initClassID<GrSimpleTextureEffect>();
}
- GrGLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override;
void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index cd89a59..42d6d708 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -9,8 +9,7 @@
#include "GrInvariantOutput.h"
#include "GrSimpleTextureEffect.h"
#include "SkFloatingPoint.h"
-#include "gl/GrGLContext.h"
-#include "gl/GrGLFragmentProcessor.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
#include "glsl/GrGLSLTextureSampler.h"
@@ -173,7 +172,7 @@
//////////////////////////////////////////////////////////////////////////////
-class GrGLTextureDomainEffect : public GrGLFragmentProcessor {
+class GrGLTextureDomainEffect : public GrGLSLFragmentProcessor {
public:
GrGLTextureDomainEffect(const GrProcessor&);
@@ -186,7 +185,7 @@
private:
GrTextureDomain::GLDomain fGLDomain;
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
GrGLTextureDomainEffect::GrGLTextureDomainEffect(const GrProcessor&) {
@@ -253,7 +252,7 @@
GrGLTextureDomainEffect::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* GrTextureDomainEffect::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* GrTextureDomainEffect::onCreateGLInstance() const {
return new GrGLTextureDomainEffect(*this);
}
diff --git a/src/gpu/effects/GrTextureDomain.h b/src/gpu/effects/GrTextureDomain.h
index 874cdbc..a215def 100644
--- a/src/gpu/effects/GrTextureDomain.h
+++ b/src/gpu/effects/GrTextureDomain.h
@@ -9,7 +9,7 @@
#define GrTextureDomainEffect_DEFINED
#include "GrSingleTextureEffect.h"
-#include "gl/GrGLFragmentProcessor.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLProgramDataManager.h"
class GrGLProgramBuilder;
@@ -89,7 +89,7 @@
}
/**
- * A GrGLFragmentProcessor subclass that corresponds to a GrProcessor subclass that uses
+ * A GrGLSLFragmentProcessor subclass that corresponds to a GrProcessor subclass that uses
* GrTextureDomain should include this helper. It generates the texture domain GLSL, produces
* the part of the effect key that reflects the texture domain code, and performs the uniform
* uploads necessary for texture domains.
@@ -104,8 +104,8 @@
}
/**
- * Call this from GrGLFragmentProcessor::emitCode() to sample the texture W.R.T. the domain
- * and mode.
+ * Call this from GrGLSLFragmentProcessor::emitCode() to sample the texture W.R.T. the
+ * domain and mode.
*
* @param outcolor name of vec4 variable to hold the sampled color.
* @param inCoords name of vec2 variable containing the coords to be used with the domain.
@@ -121,7 +121,7 @@
const char* inModulateColor = nullptr);
/**
- * Call this from GrGLFragmentProcessor::setData() to upload uniforms necessary for the
+ * Call this from GrGLSLFragmentProcessor::setData() to upload uniforms necessary for the
* texture domain. The rectangle is automatically adjusted to account for the texture's
* origin.
*/
@@ -133,7 +133,7 @@
};
/**
- * GrGLFragmentProcessor::GenKey() must call this and include the returned value in it's
+ * GrGLSLFragmentProcessor::GenKey() must call this and include the returned value in it's
* computed key. The returned will be limited to the lower kDomainKeyBits bits.
*/
static uint32_t DomainKey(const GrTextureDomain& domain) {
@@ -187,7 +187,7 @@
GrTextureParams::FilterMode,
GrCoordSet);
- GrGLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override;
void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override;
diff --git a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
index 0dbb6eb..a705df5 100644
--- a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
+++ b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
@@ -9,8 +9,8 @@
#include "GrFragmentProcessor.h"
#include "effects/GrConstColorProcessor.h"
-#include "gl/GrGLFragmentProcessor.h"
-#include "gl/GrGLSLBlend.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
+#include "glsl/GrGLSLBlend.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "SkGrPriv.h"
@@ -46,7 +46,7 @@
}
private:
- GrGLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override;
SkXfermode::Mode fMode;
@@ -57,14 +57,14 @@
/////////////////////////////////////////////////////////////////////
-class GLComposeTwoFragmentProcessor : public GrGLFragmentProcessor {
+class GLComposeTwoFragmentProcessor : public GrGLSLFragmentProcessor {
public:
GLComposeTwoFragmentProcessor(const GrProcessor& processor) {}
void emitCode(EmitArgs&) override;
private:
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
/////////////////////////////////////////////////////////////////////
@@ -81,7 +81,7 @@
return new ComposeTwoFragmentProcessor(fpA, fpB, mode);
}
-GrGLFragmentProcessor* ComposeTwoFragmentProcessor::onCreateGLInstance() const{
+GrGLSLFragmentProcessor* ComposeTwoFragmentProcessor::onCreateGLInstance() const{
return new GLComposeTwoFragmentProcessor(*this);
}
@@ -202,7 +202,7 @@
}
private:
- GrGLFragmentProcessor* onCreateGLInstance() const override;
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override;
SkXfermode::Mode fMode;
Child fChild;
@@ -214,7 +214,7 @@
//////////////////////////////////////////////////////////////////////////////
-class GLComposeOneFragmentProcessor : public GrGLFragmentProcessor {
+class GLComposeOneFragmentProcessor : public GrGLSLFragmentProcessor {
public:
GLComposeOneFragmentProcessor(const GrProcessor& processor) {}
@@ -244,7 +244,7 @@
}
private:
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
/////////////////////////////////////////////////////////////////////
@@ -264,7 +264,7 @@
return new ComposeOneFragmentProcessor(dst, mode, child);
}
-GrGLFragmentProcessor* ComposeOneFragmentProcessor::onCreateGLInstance() const {
+GrGLSLFragmentProcessor* ComposeOneFragmentProcessor::onCreateGLInstance() const {
return new GLComposeOneFragmentProcessor(*this);
}
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp
index daf1ca3..e282512 100644
--- a/src/gpu/effects/GrYUVtoRGBEffect.cpp
+++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp
@@ -10,7 +10,7 @@
#include "GrCoordTransform.h"
#include "GrInvariantOutput.h"
#include "GrProcessor.h"
-#include "gl/GrGLFragmentProcessor.h"
+#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
#include "glsl/GrGLSLProgramBuilder.h"
#include "glsl/GrGLSLProgramDataManager.h"
@@ -52,7 +52,7 @@
return fColorSpace;
}
- class GLProcessor : public GrGLFragmentProcessor {
+ class GLProcessor : public GrGLSLFragmentProcessor {
public:
static const float kJPEGConversionMatrix[16];
static const float kRec601ConversionMatrix[16];
@@ -102,7 +102,7 @@
private:
GrGLSLProgramDataManager::UniformHandle fMatrixUni;
- typedef GrGLFragmentProcessor INHERITED;
+ typedef GrGLSLFragmentProcessor INHERITED;
};
private:
@@ -125,7 +125,7 @@
this->addTextureAccess(&fVAccess);
}
- GrGLFragmentProcessor* onCreateGLInstance() const override { return new GLProcessor(*this); }
+ GrGLSLFragmentProcessor* onCreateGLInstance() const override { return new GLProcessor(*this); }
virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
GrProcessorKeyBuilder* b) const override {