aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2014-10-09 15:04:05 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-09 15:04:05 -0700
commit1598899975ecc85b003a59740b588d1ddbcedb09 (patch)
treedeb4ce50dc0068efb0e6225055d21fe8ec0998e9 /src/effects
parent1119c870651ccd34c0acb8fb2cdfad2c07d3116c (diff)
FPs now use the correct builder types(just a rename)
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/SkAlphaThresholdFilter.cpp6
-rw-r--r--src/effects/SkArithmeticMode.cpp6
-rw-r--r--src/effects/SkBlurMaskFilter.cpp14
-rw-r--r--src/effects/SkColorCubeFilter.cpp6
-rw-r--r--src/effects/SkColorFilters.cpp2
-rw-r--r--src/effects/SkColorMatrixFilter.cpp4
-rw-r--r--src/effects/SkDisplacementMapEffect.cpp6
-rw-r--r--src/effects/SkLightingImageFilter.cpp48
-rw-r--r--src/effects/SkLumaColorFilter.cpp4
-rw-r--r--src/effects/SkMagnifierImageFilter.cpp6
-rw-r--r--src/effects/SkMorphologyImageFilter.cpp6
-rw-r--r--src/effects/SkPerlinNoiseShader.cpp6
-rw-r--r--src/effects/SkTableColorFilter.cpp6
-rw-r--r--src/effects/gradients/SkGradientShader.cpp6
-rw-r--r--src/effects/gradients/SkGradientShaderPriv.h4
-rw-r--r--src/effects/gradients/SkLinearGradient.cpp4
-rw-r--r--src/effects/gradients/SkRadialGradient.cpp4
-rw-r--r--src/effects/gradients/SkSweepGradient.cpp4
-rw-r--r--src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp30
-rw-r--r--src/effects/gradients/SkTwoPointRadialGradient.cpp6
20 files changed, 89 insertions, 89 deletions
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index 462cfec55e..7215aa8372 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -120,7 +120,7 @@ class GrGLAlphaThresholdEffect : public GrGLFragmentProcessor {
public:
GrGLAlphaThresholdEffect(const GrBackendProcessorFactory&, const GrProcessor&);
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -143,7 +143,7 @@ GrGLAlphaThresholdEffect::GrGLAlphaThresholdEffect(const GrBackendProcessorFacto
: INHERITED(factory) {
}
-void GrGLAlphaThresholdEffect::emitCode(GrGLProgramBuilder* builder,
+void GrGLAlphaThresholdEffect::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
@@ -157,7 +157,7 @@ void GrGLAlphaThresholdEffect::emitCode(GrGLProgramBuilder* builder,
GrGLProgramBuilder::kFragment_Visibility,
kFloat_GrSLType, "outer_threshold");
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
SkString coords2D = fsBuilder->ensureFSCoords2D(coords, 0);
SkString maskCoords2D = fsBuilder->ensureFSCoords2D(coords, 1);
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
index b62b33db9a..107c7842da 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -253,7 +253,7 @@ public:
GrGLArithmeticEffect(const GrBackendProcessorFactory&, const GrProcessor&);
virtual ~GrGLArithmeticEffect();
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -361,7 +361,7 @@ GrGLArithmeticEffect::GrGLArithmeticEffect(const GrBackendProcessorFactory& fact
GrGLArithmeticEffect::~GrGLArithmeticEffect() {
}
-void GrGLArithmeticEffect::emitCode(GrGLProgramBuilder* builder,
+void GrGLArithmeticEffect::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor& fp,
const GrProcessorKey& key,
const char* outputColor,
@@ -370,7 +370,7 @@ void GrGLArithmeticEffect::emitCode(GrGLProgramBuilder* builder,
const TextureSamplerArray& samplers) {
GrTexture* backgroundTex = fp.cast<GrArithmeticEffect>().backgroundTexture();
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
const char* dstColor;
if (backgroundTex) {
fsBuilder->codeAppend("\t\tvec4 bgColor = ");
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index 251398ca5b..79cf7e6494 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -610,7 +610,7 @@ class GrGLRectBlurEffect : public GrGLFragmentProcessor {
public:
GrGLRectBlurEffect(const GrBackendProcessorFactory& factory,
const GrProcessor&);
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -635,7 +635,7 @@ GrGLRectBlurEffect::GrGLRectBlurEffect(const GrBackendProcessorFactory& factory,
: INHERITED(factory) {
}
-void OutputRectBlurProfileLookup(GrGLFragmentShaderBuilder* fsBuilder,
+void OutputRectBlurProfileLookup(GrGLFPFragmentBuilder* fsBuilder,
const GrGLShaderBuilder::TextureSampler& sampler,
const char *output,
const char *profileSize, const char *loc,
@@ -651,7 +651,7 @@ void OutputRectBlurProfileLookup(GrGLFragmentShaderBuilder* fsBuilder,
fsBuilder->codeAppendf("\t\t}\n");
}
-void GrGLRectBlurEffect::emitCode(GrGLProgramBuilder* builder,
+void GrGLRectBlurEffect::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
@@ -671,7 +671,7 @@ void GrGLRectBlurEffect::emitCode(GrGLProgramBuilder* builder,
"profileSize",
&profileSizeName);
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
const char *fragmentPos = fsBuilder->fragmentPosition();
if (inputColor) {
@@ -974,7 +974,7 @@ class GrGLRRectBlurEffect : public GrGLFragmentProcessor {
public:
GrGLRRectBlurEffect(const GrBackendProcessorFactory&, const GrProcessor&);
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -996,7 +996,7 @@ GrGLRRectBlurEffect::GrGLRRectBlurEffect(const GrBackendProcessorFactory& factor
: INHERITED (factory) {
}
-void GrGLRRectBlurEffect::emitCode(GrGLProgramBuilder* builder,
+void GrGLRRectBlurEffect::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -1023,7 +1023,7 @@ void GrGLRRectBlurEffect::emitCode(GrGLProgramBuilder* builder,
"blurRadius",
&blurRadiusName);
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
const char* fragmentPos = fsBuilder->fragmentPosition();
// warp the fragment position to the appropriate part of the 9patch blur texture
diff --git a/src/effects/SkColorCubeFilter.cpp b/src/effects/SkColorCubeFilter.cpp
index 9f0d36a30d..c94afae748 100644
--- a/src/effects/SkColorCubeFilter.cpp
+++ b/src/effects/SkColorCubeFilter.cpp
@@ -212,7 +212,7 @@ public:
GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor&);
virtual ~GLProcessor();
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -278,7 +278,7 @@ GrColorProfileEffect::GLProcessor::GLProcessor(const GrBackendProcessorFactory&
GrColorProfileEffect::GLProcessor::~GLProcessor() {
}
-void GrColorProfileEffect::GLProcessor::emitCode(GrGLProgramBuilder* builder,
+void GrColorProfileEffect::GLProcessor::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -305,7 +305,7 @@ void GrColorProfileEffect::GLProcessor::emitCode(GrGLProgramBuilder* builder,
// Note: if implemented using texture3D in OpenGL ES older than OpenGL ES 3.0,
// the shader might need "#extension GL_OES_texture_3D : enable".
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
// Unpremultiply color
fsBuilder->codeAppendf("\tfloat %s = max(%s.a, 0.00001);\n", nonZeroAlpha, inputColor);
diff --git a/src/effects/SkColorFilters.cpp b/src/effects/SkColorFilters.cpp
index 8e10d73a0e..fdce937eaf 100644
--- a/src/effects/SkColorFilters.cpp
+++ b/src/effects/SkColorFilters.cpp
@@ -220,7 +220,7 @@ public:
: INHERITED(factory) {
}
- virtual void emitCode(GrGLProgramBuilder* builder,
+ virtual void emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor& fp,
const GrProcessorKey&,
const char* outputColor,
diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp
index 8549fd72e1..e4d9f52aab 100644
--- a/src/effects/SkColorMatrixFilter.cpp
+++ b/src/effects/SkColorMatrixFilter.cpp
@@ -361,7 +361,7 @@ public:
: INHERITED(factory) {
}
- virtual void emitCode(GrGLProgramBuilder* builder,
+ virtual void emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -379,7 +379,7 @@ public:
// could optimize this case, but we aren't for now.
inputColor = "vec4(1)";
}
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
// The max() is to guard against 0 / 0 during unpremul when the incoming color is
// transparent black.
fsBuilder->codeAppendf("\tfloat nonZeroAlpha = max(%s.a, 0.00001);\n", inputColor);
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index ace9e02866..d137fba8c0 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -303,7 +303,7 @@ public:
const GrProcessor&);
virtual ~GrGLDisplacementMapEffect();
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -540,7 +540,7 @@ GrGLDisplacementMapEffect::GrGLDisplacementMapEffect(const GrBackendProcessorFac
GrGLDisplacementMapEffect::~GrGLDisplacementMapEffect() {
}
-void GrGLDisplacementMapEffect::emitCode(GrGLProgramBuilder* builder,
+void GrGLDisplacementMapEffect::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
@@ -559,7 +559,7 @@ void GrGLDisplacementMapEffect::emitCode(GrGLProgramBuilder* builder,
// a number smaller than that to approximate 0, but
// leave room for 32-bit float GPU rounding errors.
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
fsBuilder->codeAppendf("\t\tvec4 %s = ", dColor);
fsBuilder->appendTextureLookup(samplers[0], coords[0].c_str(), coords[0].getType());
fsBuilder->codeAppend(";\n");
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index 4a4665d481..e78fd622a0 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -450,7 +450,7 @@ public:
* This is called by GrGLLightingEffect::emitCode() before either of the two virtual functions
* below. It adds a vec3f uniform visible in the FS that represents the constant light color.
*/
- void emitLightColorUniform(GrGLProgramBuilder*);
+ void emitLightColorUniform(GrGLFPBuilder*);
/**
* These two functions are called from GrGLLightingEffect's emitCode() function.
@@ -460,8 +460,8 @@ public:
* the FS. The default of emitLightColor appends the name of the constant light color uniform
* and so this function only needs to be overridden if the light color varies spatially.
*/
- virtual void emitSurfaceToLight(GrGLProgramBuilder*, const char* z) = 0;
- virtual void emitLightColor(GrGLProgramBuilder*, const char *surfaceToLight);
+ virtual void emitSurfaceToLight(GrGLFPBuilder*, const char* z) = 0;
+ virtual void emitLightColor(GrGLFPBuilder*, const char *surfaceToLight);
// This is called from GrGLLightingEffect's setData(). Subclasses of GrGLLight must call
// INHERITED::setData().
@@ -488,7 +488,7 @@ public:
virtual ~GrGLDistantLight() {}
virtual void setData(const GrGLProgramDataManager&,
const SkLight* light) const SK_OVERRIDE;
- virtual void emitSurfaceToLight(GrGLProgramBuilder*, const char* z) SK_OVERRIDE;
+ virtual void emitSurfaceToLight(GrGLFPBuilder*, const char* z) SK_OVERRIDE;
private:
typedef GrGLLight INHERITED;
@@ -502,7 +502,7 @@ public:
virtual ~GrGLPointLight() {}
virtual void setData(const GrGLProgramDataManager&,
const SkLight* light) const SK_OVERRIDE;
- virtual void emitSurfaceToLight(GrGLProgramBuilder*, const char* z) SK_OVERRIDE;
+ virtual void emitSurfaceToLight(GrGLFPBuilder*, const char* z) SK_OVERRIDE;
private:
typedef GrGLLight INHERITED;
@@ -516,8 +516,8 @@ public:
virtual ~GrGLSpotLight() {}
virtual void setData(const GrGLProgramDataManager&,
const SkLight* light) const SK_OVERRIDE;
- virtual void emitSurfaceToLight(GrGLProgramBuilder*, const char* z) SK_OVERRIDE;
- virtual void emitLightColor(GrGLProgramBuilder*, const char *surfaceToLight) SK_OVERRIDE;
+ virtual void emitSurfaceToLight(GrGLFPBuilder*, const char* z) SK_OVERRIDE;
+ virtual void emitLightColor(GrGLFPBuilder*, const char *surfaceToLight) SK_OVERRIDE;
private:
typedef GrGLLight INHERITED;
@@ -1228,7 +1228,7 @@ public:
GrGLLightingEffect(const GrBackendProcessorFactory&, const GrProcessor&);
virtual ~GrGLLightingEffect();
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -1244,7 +1244,7 @@ public:
virtual void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE;
protected:
- virtual void emitLightFunc(GrGLProgramBuilder*, SkString* funcName) = 0;
+ virtual void emitLightFunc(GrGLFPBuilder*, SkString* funcName) = 0;
private:
typedef GrGLFragmentProcessor INHERITED;
@@ -1259,7 +1259,7 @@ private:
class GrGLDiffuseLightingEffect : public GrGLLightingEffect {
public:
GrGLDiffuseLightingEffect(const GrBackendProcessorFactory&, const GrProcessor&);
- virtual void emitLightFunc(GrGLProgramBuilder*, SkString* funcName) SK_OVERRIDE;
+ virtual void emitLightFunc(GrGLFPBuilder*, SkString* funcName) SK_OVERRIDE;
virtual void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE;
private:
@@ -1273,7 +1273,7 @@ private:
class GrGLSpecularLightingEffect : public GrGLLightingEffect {
public:
GrGLSpecularLightingEffect(const GrBackendProcessorFactory&, const GrProcessor&);
- virtual void emitLightFunc(GrGLProgramBuilder*, SkString* funcName) SK_OVERRIDE;
+ virtual void emitLightFunc(GrGLFPBuilder*, SkString* funcName) SK_OVERRIDE;
virtual void setData(const GrGLProgramDataManager&, const GrProcessor&) SK_OVERRIDE;
private:
@@ -1361,7 +1361,7 @@ GrGLLightingEffect::~GrGLLightingEffect() {
delete fLight;
}
-void GrGLLightingEffect::emitCode(GrGLProgramBuilder* builder,
+void GrGLLightingEffect::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
@@ -1387,7 +1387,7 @@ void GrGLLightingEffect::emitCode(GrGLProgramBuilder* builder,
GrGLShaderVar("scale", kFloat_GrSLType),
};
SkString sobelFuncName;
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
SkString coords2D = fsBuilder->ensureFSCoords2D(coords, 0);
fsBuilder->emitFunction(kFloat_GrSLType,
@@ -1483,7 +1483,7 @@ GrGLDiffuseLightingEffect::GrGLDiffuseLightingEffect(const GrBackendProcessorFac
: INHERITED(factory, proc) {
}
-void GrGLDiffuseLightingEffect::emitLightFunc(GrGLProgramBuilder* builder, SkString* funcName) {
+void GrGLDiffuseLightingEffect::emitLightFunc(GrGLFPBuilder* builder, SkString* funcName) {
const char* kd;
fKDUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
kFloat_GrSLType,
@@ -1562,7 +1562,7 @@ GrGLSpecularLightingEffect::GrGLSpecularLightingEffect(const GrBackendProcessorF
: INHERITED(factory, proc) {
}
-void GrGLSpecularLightingEffect::emitLightFunc(GrGLProgramBuilder* builder, SkString* funcName) {
+void GrGLSpecularLightingEffect::emitLightFunc(GrGLFPBuilder* builder, SkString* funcName) {
const char* ks;
const char* shininess;
@@ -1598,12 +1598,12 @@ void GrGLSpecularLightingEffect::setData(const GrGLProgramDataManager& pdman,
}
///////////////////////////////////////////////////////////////////////////////
-void GrGLLight::emitLightColorUniform(GrGLProgramBuilder* builder) {
+void GrGLLight::emitLightColorUniform(GrGLFPBuilder* builder) {
fColorUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
kVec3f_GrSLType, "LightColor");
}
-void GrGLLight::emitLightColor(GrGLProgramBuilder* builder,
+void GrGLLight::emitLightColor(GrGLFPBuilder* builder,
const char *surfaceToLight) {
builder->getFragmentShaderBuilder()->codeAppend(builder->getUniformCStr(this->lightColorUni()));
}
@@ -1623,7 +1623,7 @@ void GrGLDistantLight::setData(const GrGLProgramDataManager& pdman,
setUniformNormal3(pdman, fDirectionUni, distantLight->direction());
}
-void GrGLDistantLight::emitSurfaceToLight(GrGLProgramBuilder* builder, const char* z) {
+void GrGLDistantLight::emitSurfaceToLight(GrGLFPBuilder* builder, const char* z) {
const char* dir;
fDirectionUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility, kVec3f_GrSLType,
"LightDirection", &dir);
@@ -1640,11 +1640,11 @@ void GrGLPointLight::setData(const GrGLProgramDataManager& pdman,
setUniformPoint3(pdman, fLocationUni, pointLight->location());
}
-void GrGLPointLight::emitSurfaceToLight(GrGLProgramBuilder* builder, const char* z) {
+void GrGLPointLight::emitSurfaceToLight(GrGLFPBuilder* builder, const char* z) {
const char* loc;
fLocationUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility, kVec3f_GrSLType,
"LightLocation", &loc);
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
fsBuilder->codeAppendf("normalize(%s - vec3(%s.xy, %s))",
loc, fsBuilder->fragmentPosition(), z);
}
@@ -1664,17 +1664,17 @@ void GrGLSpotLight::setData(const GrGLProgramDataManager& pdman,
setUniformNormal3(pdman, fSUni, spotLight->s());
}
-void GrGLSpotLight::emitSurfaceToLight(GrGLProgramBuilder* builder, const char* z) {
+void GrGLSpotLight::emitSurfaceToLight(GrGLFPBuilder* builder, const char* z) {
const char* location;
fLocationUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
kVec3f_GrSLType, "LightLocation", &location);
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
fsBuilder->codeAppendf("normalize(%s - vec3(%s.xy, %s))",
location, fsBuilder->fragmentPosition(), z);
}
-void GrGLSpotLight::emitLightColor(GrGLProgramBuilder* builder,
+void GrGLSpotLight::emitLightColor(GrGLFPBuilder* builder,
const char *surfaceToLight) {
const char* color = builder->getUniformCStr(this->lightColorUni()); // created by parent class.
@@ -1709,7 +1709,7 @@ void GrGLSpotLight::emitLightColor(GrGLProgramBuilder* builder,
color, cosOuter, coneScale);
lightColorBody.appendf("\t}\n");
lightColorBody.appendf("\treturn %s;\n", color);
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
fsBuilder->emitFunction(kVec3f_GrSLType,
"lightColor",
SK_ARRAY_COUNT(gLightColorArgs),
diff --git a/src/effects/SkLumaColorFilter.cpp b/src/effects/SkLumaColorFilter.cpp
index 616bcde891..1ca3c1623a 100644
--- a/src/effects/SkLumaColorFilter.cpp
+++ b/src/effects/SkLumaColorFilter.cpp
@@ -82,7 +82,7 @@ public:
static void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder* b) {}
- virtual void emitCode(GrGLProgramBuilder* builder,
+ virtual void emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -93,7 +93,7 @@ public:
inputColor = "vec4(1)";
}
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
fsBuilder->codeAppendf("\tfloat luma = dot(vec3(%f, %f, %f), %s.rgb);\n",
SK_ITU_BT709_LUM_COEFF_R,
SK_ITU_BT709_LUM_COEFF_G,
diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp
index 54ca97e38d..97e9068323 100644
--- a/src/effects/SkMagnifierImageFilter.cpp
+++ b/src/effects/SkMagnifierImageFilter.cpp
@@ -95,7 +95,7 @@ class GrGLMagnifierEffect : public GrGLFragmentProcessor {
public:
GrGLMagnifierEffect(const GrBackendProcessorFactory&, const GrProcessor&);
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -118,7 +118,7 @@ GrGLMagnifierEffect::GrGLMagnifierEffect(const GrBackendProcessorFactory& factor
: INHERITED(factory) {
}
-void GrGLMagnifierEffect::emitCode(GrGLProgramBuilder* builder,
+void GrGLMagnifierEffect::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
@@ -138,7 +138,7 @@ void GrGLMagnifierEffect::emitCode(GrGLProgramBuilder* builder,
GrGLProgramBuilder::kVertex_Visibility,
kVec2f_GrSLType, "InvInset");
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
SkString coords2D = fsBuilder->ensureFSCoords2D(coords, 0);
fsBuilder->codeAppendf("\t\tvec2 coord = %s;\n", coords2D.c_str());
fsBuilder->codeAppendf("\t\tvec2 zoom_coord = %s + %s * %s;\n",
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 71a70d6459..8b6808de0c 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -332,7 +332,7 @@ class GrGLMorphologyEffect : public GrGLFragmentProcessor {
public:
GrGLMorphologyEffect (const GrBackendProcessorFactory&, const GrProcessor&);
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -362,7 +362,7 @@ GrGLMorphologyEffect::GrGLMorphologyEffect(const GrBackendProcessorFactory& fact
fType = m.type();
}
-void GrGLMorphologyEffect::emitCode(GrGLProgramBuilder* builder,
+void GrGLMorphologyEffect::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
@@ -372,7 +372,7 @@ void GrGLMorphologyEffect::emitCode(GrGLProgramBuilder* builder,
fImageIncrementUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
kVec2f_GrSLType, "ImageIncrement");
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
SkString coords2D = fsBuilder->ensureFSCoords2D(coords, 0);
const char* func;
switch (fType) {
diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp
index 861e829237..e9f6c60da8 100644
--- a/src/effects/SkPerlinNoiseShader.cpp
+++ b/src/effects/SkPerlinNoiseShader.cpp
@@ -515,7 +515,7 @@ public:
const GrProcessor&);
virtual ~GrGLPerlinNoise() {}
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -665,7 +665,7 @@ GrGLPerlinNoise::GrGLPerlinNoise(const GrBackendProcessorFactory& factory,
, fNumOctaves(processor.cast<GrPerlinNoiseEffect>().numOctaves()) {
}
-void GrGLPerlinNoise::emitCode(GrGLProgramBuilder* builder,
+void GrGLPerlinNoise::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
@@ -674,7 +674,7 @@ void GrGLPerlinNoise::emitCode(GrGLProgramBuilder* builder,
const TextureSamplerArray& samplers) {
sk_ignore_unused_variable(inputColor);
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
SkString vCoords = fsBuilder->ensureFSCoords2D(coords, 0);
fBaseFrequencyUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index 8f385ce1b3..b0e61cad56 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -316,7 +316,7 @@ class GLColorTableEffect : public GrGLFragmentProcessor {
public:
GLColorTableEffect(const GrBackendProcessorFactory&, const GrProcessor&);
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -337,7 +337,7 @@ GLColorTableEffect::GLColorTableEffect(const GrBackendProcessorFactory& factory,
: INHERITED(factory) {
}
-void GLColorTableEffect::emitCode(GrGLProgramBuilder* builder,
+void GLColorTableEffect::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -347,7 +347,7 @@ void GLColorTableEffect::emitCode(GrGLProgramBuilder* builder,
static const float kColorScaleFactor = 255.0f / 256.0f;
static const float kColorOffsetFactor = 1.0f / 512.0f;
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
if (NULL == inputColor) {
// the input color is solid white (all ones).
static const float kMaxValue = kColorScaleFactor + kColorOffsetFactor;
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp
index cb9cfff43f..87cca3bf9c 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -956,7 +956,7 @@ GrGLGradientEffect::GrGLGradientEffect(const GrBackendProcessorFactory& factory)
GrGLGradientEffect::~GrGLGradientEffect() { }
-void GrGLGradientEffect::emitUniforms(GrGLProgramBuilder* builder, uint32_t baseKey) {
+void GrGLGradientEffect::emitUniforms(GrGLFPBuilder* builder, uint32_t baseKey) {
if (SkGradientShaderBase::kTwo_GpuColorType == ColorTypeFromKey(baseKey)) { // 2 Color case
fColorStartUni = builder->addUniform(GrGLProgramBuilder::kFragment_Visibility,
@@ -1056,13 +1056,13 @@ uint32_t GrGLGradientEffect::GenBaseGradientKey(const GrProcessor& processor) {
return key;
}
-void GrGLGradientEffect::emitColor(GrGLProgramBuilder* builder,
+void GrGLGradientEffect::emitColor(GrGLFPBuilder* builder,
const char* gradientTValue,
uint32_t baseKey,
const char* outputColor,
const char* inputColor,
const TextureSamplerArray& samplers) {
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
if (SkGradientShaderBase::kTwo_GpuColorType == ColorTypeFromKey(baseKey)){
fsBuilder->codeAppendf("\tvec4 colorTemp = mix(%s, %s, clamp(%s, 0.0, 1.0));\n",
builder->getUniformVariable(fColorStartUni).c_str(),
diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h
index 33d8adde05..d1ac77bc92 100644
--- a/src/effects/gradients/SkGradientShaderPriv.h
+++ b/src/effects/gradients/SkGradientShaderPriv.h
@@ -415,13 +415,13 @@ protected:
// Emits the uniform used as the y-coord to texture samples in derived classes. Subclasses
// should call this method from their emitCode().
- void emitUniforms(GrGLProgramBuilder* builder, uint32_t baseKey);
+ void emitUniforms(GrGLFPBuilder* builder, uint32_t baseKey);
// emit code that gets a fragment's color from an expression for t; Has branches for 3 separate
// control flows inside -- 2 color gradients, 3 color symmetric gradients (both using
// native GLSL mix), and 4+ color gradients that use the traditional texture lookup.
- void emitColor(GrGLProgramBuilder* builder,
+ void emitColor(GrGLFPBuilder* builder,
const char* gradientTValue,
uint32_t baseKey,
const char* outputColor,
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index 058e61cb8a..3f581ff2a1 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -473,7 +473,7 @@ public:
virtual ~GrGLLinearGradient() { }
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -550,7 +550,7 @@ GrFragmentProcessor* GrLinearGradient::TestCreate(SkRandom* random,
/////////////////////////////////////////////////////////////////////
-void GrGLLinearGradient::emitCode(GrGLProgramBuilder* builder,
+void GrGLLinearGradient::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp
index b4ced5e6a8..2066eb6392 100644
--- a/src/effects/gradients/SkRadialGradient.cpp
+++ b/src/effects/gradients/SkRadialGradient.cpp
@@ -480,7 +480,7 @@ public:
const GrProcessor&) : INHERITED (factory) { }
virtual ~GrGLRadialGradient() { }
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -559,7 +559,7 @@ GrFragmentProcessor* GrRadialGradient::TestCreate(SkRandom* random,
/////////////////////////////////////////////////////////////////////
-void GrGLRadialGradient::emitCode(GrGLProgramBuilder* builder,
+void GrGLRadialGradient::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp
index 750e80a6d2..154c0036c4 100644
--- a/src/effects/gradients/SkSweepGradient.cpp
+++ b/src/effects/gradients/SkSweepGradient.cpp
@@ -195,7 +195,7 @@ public:
const GrProcessor&) : INHERITED (factory) { }
virtual ~GrGLSweepGradient() { }
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -266,7 +266,7 @@ GrFragmentProcessor* GrSweepGradient::TestCreate(SkRandom* random,
/////////////////////////////////////////////////////////////////////
-void GrGLSweepGradient::emitCode(GrGLProgramBuilder* builder,
+void GrGLSweepGradient::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
diff --git a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
index 206d2d9687..53e28eacaf 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
@@ -140,7 +140,7 @@ public:
GLEdge2PtConicalEffect(const GrBackendProcessorFactory& factory, const GrProcessor&);
virtual ~GLEdge2PtConicalEffect() { }
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -223,7 +223,7 @@ GLEdge2PtConicalEffect::GLEdge2PtConicalEffect(const GrBackendProcessorFactory&
, fCachedRadius(-SK_ScalarMax)
, fCachedDiffRadius(-SK_ScalarMax) {}
-void GLEdge2PtConicalEffect::emitCode(GrGLProgramBuilder* builder,
+void GLEdge2PtConicalEffect::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
@@ -249,7 +249,7 @@ void GLEdge2PtConicalEffect::emitCode(GrGLProgramBuilder* builder,
SkASSERT(coords[0].getType() == coords[1].getType());
const char* coords2D;
SkString bVar;
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
if (kVec3f_GrSLType == coords[0].getType()) {
fsBuilder->codeAppendf("\tvec3 interpolants = vec3(%s.xy / %s.z, %s.x / %s.z);\n",
coords[0].c_str(), coords[0].c_str(), coords[1].c_str(),
@@ -421,7 +421,7 @@ public:
GLFocalOutside2PtConicalEffect(const GrBackendProcessorFactory& factory, const GrProcessor&);
virtual ~GLFocalOutside2PtConicalEffect() { }
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -504,7 +504,7 @@ GLFocalOutside2PtConicalEffect::GLFocalOutside2PtConicalEffect(const GrBackendPr
fIsFlipped = data.isFlipped();
}
-void GLFocalOutside2PtConicalEffect::emitCode(GrGLProgramBuilder* builder,
+void GLFocalOutside2PtConicalEffect::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
@@ -523,7 +523,7 @@ void GLFocalOutside2PtConicalEffect::emitCode(GrGLProgramBuilder* builder,
builder->getUniformVariable(fParamUni).appendArrayAccess(1, &p1);
// if we have a vec3 from being in perspective, convert it to a vec2 first
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
SkString coords2DString = fsBuilder->ensureFSCoords2D(coords, 0);
const char* coords2D = coords2DString.c_str();
@@ -630,7 +630,7 @@ public:
GLFocalInside2PtConicalEffect(const GrBackendProcessorFactory& factory, const GrProcessor&);
virtual ~GLFocalInside2PtConicalEffect() {}
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -710,7 +710,7 @@ GLFocalInside2PtConicalEffect::GLFocalInside2PtConicalEffect(const GrBackendProc
, fFSVaryingName(NULL)
, fCachedFocal(SK_ScalarMax) {}
-void GLFocalInside2PtConicalEffect::emitCode(GrGLProgramBuilder* builder,
+void GLFocalInside2PtConicalEffect::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
@@ -728,7 +728,7 @@ void GLFocalInside2PtConicalEffect::emitCode(GrGLProgramBuilder* builder,
GrGLShaderVar focal = builder->getUniformVariable(fFocalUni);
// if we have a vec3 from being in perspective, convert it to a vec2 first
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
SkString coords2DString = fsBuilder->ensureFSCoords2D(coords, 0);
const char* coords2D = coords2DString.c_str();
@@ -875,7 +875,7 @@ public:
GLCircleInside2PtConicalEffect(const GrBackendProcessorFactory& factory, const GrProcessor&);
virtual ~GLCircleInside2PtConicalEffect() {}
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -963,7 +963,7 @@ GLCircleInside2PtConicalEffect::GLCircleInside2PtConicalEffect(const GrBackendPr
, fCachedB(SK_ScalarMax)
, fCachedC(SK_ScalarMax) {}
-void GLCircleInside2PtConicalEffect::emitCode(GrGLProgramBuilder* builder,
+void GLCircleInside2PtConicalEffect::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
@@ -985,7 +985,7 @@ void GLCircleInside2PtConicalEffect::emitCode(GrGLProgramBuilder* builder,
GrGLShaderVar params = builder->getUniformVariable(fParamUni);
// if we have a vec3 from being in perspective, convert it to a vec2 first
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
SkString coords2DString = fsBuilder->ensureFSCoords2D(coords, 0);
const char* coords2D = coords2DString.c_str();
@@ -1107,7 +1107,7 @@ public:
GLCircleOutside2PtConicalEffect(const GrBackendProcessorFactory&, const GrProcessor&);
virtual ~GLCircleOutside2PtConicalEffect() {}
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -1203,7 +1203,7 @@ GLCircleOutside2PtConicalEffect::GLCircleOutside2PtConicalEffect(const GrBackend
fIsFlipped = data.isFlipped();
}
-void GLCircleOutside2PtConicalEffect::emitCode(GrGLProgramBuilder* builder,
+void GLCircleOutside2PtConicalEffect::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
@@ -1225,7 +1225,7 @@ void GLCircleOutside2PtConicalEffect::emitCode(GrGLProgramBuilder* builder,
GrGLShaderVar params = builder->getUniformVariable(fParamUni);
// if we have a vec3 from being in perspective, convert it to a vec2 first
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
SkString coords2DString = fsBuilder->ensureFSCoords2D(coords, 0);
const char* coords2D = coords2DString.c_str();
diff --git a/src/effects/gradients/SkTwoPointRadialGradient.cpp b/src/effects/gradients/SkTwoPointRadialGradient.cpp
index 3b4be2d331..d83a937a66 100644
--- a/src/effects/gradients/SkTwoPointRadialGradient.cpp
+++ b/src/effects/gradients/SkTwoPointRadialGradient.cpp
@@ -411,7 +411,7 @@ public:
GrGLRadial2Gradient(const GrBackendProcessorFactory& factory, const GrProcessor&);
virtual ~GrGLRadial2Gradient() { }
- virtual void emitCode(GrGLProgramBuilder*,
+ virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
const GrProcessorKey&,
const char* outputColor,
@@ -567,7 +567,7 @@ GrGLRadial2Gradient::GrGLRadial2Gradient(const GrBackendProcessorFactory& factor
fIsDegenerate = data.isDegenerate();
}
-void GrGLRadial2Gradient::emitCode(GrGLProgramBuilder* builder,
+void GrGLRadial2Gradient::emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor&,
const GrProcessorKey& key,
const char* outputColor,
@@ -596,7 +596,7 @@ void GrGLRadial2Gradient::emitCode(GrGLProgramBuilder* builder,
builder->getUniformVariable(fParamUni).appendArrayAccess(4, &p4);
builder->getUniformVariable(fParamUni).appendArrayAccess(5, &p5);
- GrGLFragmentShaderBuilder* fsBuilder = builder->getFragmentShaderBuilder();
+ GrGLFPFragmentBuilder* fsBuilder = builder->getFragmentShaderBuilder();
// We interpolate the linear component in coords[1].
SkASSERT(coords[0].getType() == coords[1].getType());
const char* coords2D;