Index: src/gpu/effects/GrBezierEffect.cpp |
diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp |
index 1cf5e18faba18da908f52da20109a336c85d821d..febf18fbd2919b201b547b66fa6d5dc5c3d692d7 100644 |
--- a/src/gpu/effects/GrBezierEffect.cpp |
+++ b/src/gpu/effects/GrBezierEffect.cpp |
@@ -10,7 +10,7 @@ |
#include "gl/GrGLFragmentProcessor.h" |
#include "gl/GrGLGeometryProcessor.h" |
#include "gl/GrGLUtil.h" |
-#include "gl/builders/GrGLProgramBuilder.h" |
+#include "glsl/GrGLSLProgramBuilder.h" |
#include "glsl/GrGLSLProgramDataManager.h" |
class GrGLConicEffect : public GrGLGeometryProcessor { |
@@ -74,7 +74,7 @@ GrGLConicEffect::GrGLConicEffect(const GrGeometryProcessor& processor) |
void GrGLConicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
GrGLSLGPBuilder* pb = args.fPB; |
- GrGLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder(); |
+ GrGLSLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder(); |
const GrConicEffect& gp = args.fGP.cast<GrConicEffect>(); |
// emit attributes |
@@ -96,13 +96,13 @@ void GrGLConicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
this->emitTransforms(pb, gpArgs->fPositionVar, gp.inPosition()->fName, gp.localMatrix(), |
args.fTransformsIn, args.fTransformsOut); |
- GrGLFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); |
+ GrGLSLFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); |
fsBuilder->codeAppend("float edgeAlpha;"); |
switch (fEdgeType) { |
case kHairlineAA_GrProcessorEdgeType: { |
SkAssertResult(fsBuilder->enableFeature( |
- GrGLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature)); |
+ GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature)); |
fsBuilder->codeAppendf("vec3 dklmdx = dFdx(%s.xyz);", v.fsIn()); |
fsBuilder->codeAppendf("vec3 dklmdy = dFdy(%s.xyz);", v.fsIn()); |
fsBuilder->codeAppendf("float dfdx =" |
@@ -124,7 +124,7 @@ void GrGLConicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
} |
case kFillAA_GrProcessorEdgeType: { |
SkAssertResult(fsBuilder->enableFeature( |
- GrGLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature)); |
+ GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature)); |
fsBuilder->codeAppendf("vec3 dklmdx = dFdx(%s.xyz);", v.fsIn()); |
fsBuilder->codeAppendf("vec3 dklmdy = dFdy(%s.xyz);", v.fsIn()); |
fsBuilder->codeAppendf("float dfdx =" |
@@ -156,7 +156,7 @@ void GrGLConicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
// TODO should we really be doing this? |
if (gp.coverageScale() != 0xff) { |
const char* coverageScale; |
- fCoverageScaleUniform = pb->addUniform(GrGLProgramBuilder::kFragment_Visibility, |
+ fCoverageScaleUniform = pb->addUniform(GrGLSLProgramBuilder::kFragment_Visibility, |
kFloat_GrSLType, |
kDefault_GrSLPrecision, |
"Coverage", |
@@ -290,7 +290,7 @@ GrGLQuadEffect::GrGLQuadEffect(const GrGeometryProcessor& processor) |
void GrGLQuadEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
GrGLSLGPBuilder* pb = args.fPB; |
- GrGLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder(); |
+ GrGLSLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder(); |
const GrQuadEffect& gp = args.fGP.cast<GrQuadEffect>(); |
// emit attributes |
@@ -312,13 +312,13 @@ void GrGLQuadEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
this->emitTransforms(pb, gpArgs->fPositionVar, gp.inPosition()->fName, gp.localMatrix(), |
args.fTransformsIn, args.fTransformsOut); |
- GrGLFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); |
+ GrGLSLFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); |
fsBuilder->codeAppendf("float edgeAlpha;"); |
switch (fEdgeType) { |
case kHairlineAA_GrProcessorEdgeType: { |
SkAssertResult(fsBuilder->enableFeature( |
- GrGLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature)); |
+ GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature)); |
fsBuilder->codeAppendf("vec2 duvdx = dFdx(%s.xy);", v.fsIn()); |
fsBuilder->codeAppendf("vec2 duvdy = dFdy(%s.xy);", v.fsIn()); |
fsBuilder->codeAppendf("vec2 gF = vec2(2.0 * %s.x * duvdx.x - duvdx.y," |
@@ -333,7 +333,7 @@ void GrGLQuadEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
} |
case kFillAA_GrProcessorEdgeType: { |
SkAssertResult(fsBuilder->enableFeature( |
- GrGLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature)); |
+ GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature)); |
fsBuilder->codeAppendf("vec2 duvdx = dFdx(%s.xy);", v.fsIn()); |
fsBuilder->codeAppendf("vec2 duvdy = dFdy(%s.xy);", v.fsIn()); |
fsBuilder->codeAppendf("vec2 gF = vec2(2.0 * %s.x * duvdx.x - duvdx.y," |
@@ -357,7 +357,7 @@ void GrGLQuadEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
if (0xff != gp.coverageScale()) { |
const char* coverageScale; |
- fCoverageScaleUniform = pb->addUniform(GrGLProgramBuilder::kFragment_Visibility, |
+ fCoverageScaleUniform = pb->addUniform(GrGLSLProgramBuilder::kFragment_Visibility, |
kFloat_GrSLType, |
kDefault_GrSLPrecision, |
"Coverage", |
@@ -477,7 +477,7 @@ GrGLCubicEffect::GrGLCubicEffect(const GrGeometryProcessor& processor) |
} |
void GrGLCubicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
- GrGLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder(); |
+ GrGLSLVertexBuilder* vsBuilder = args.fPB->getVertexShaderBuilder(); |
const GrCubicEffect& gp = args.fGP.cast<GrCubicEffect>(); |
// emit attributes |
@@ -500,7 +500,7 @@ void GrGLCubicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
this->emitTransforms(args.fPB, gpArgs->fPositionVar, gp.inPosition()->fName, args.fTransformsIn, |
args.fTransformsOut); |
- GrGLFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); |
+ GrGLSLFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder(); |
GrGLSLShaderVar edgeAlpha("edgeAlpha", kFloat_GrSLType, 0, kHigh_GrSLPrecision); |
GrGLSLShaderVar dklmdx("dklmdx", kVec3f_GrSLType, 0, kHigh_GrSLPrecision); |
@@ -523,7 +523,7 @@ void GrGLCubicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
switch (fEdgeType) { |
case kHairlineAA_GrProcessorEdgeType: { |
SkAssertResult(fsBuilder->enableFeature( |
- GrGLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature)); |
+ GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature)); |
fsBuilder->codeAppendf("%s = dFdx(%s.xyz);", dklmdx.c_str(), v.fsIn()); |
fsBuilder->codeAppendf("%s = dFdy(%s.xyz);", dklmdy.c_str(), v.fsIn()); |
fsBuilder->codeAppendf("%s = 3.0 * %s.x * %s.x * %s.x - %s.y * %s.z - %s.z * %s.y;", |
@@ -549,7 +549,7 @@ void GrGLCubicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { |
} |
case kFillAA_GrProcessorEdgeType: { |
SkAssertResult(fsBuilder->enableFeature( |
- GrGLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature)); |
+ GrGLSLFragmentShaderBuilder::kStandardDerivatives_GLSLFeature)); |
fsBuilder->codeAppendf("%s = dFdx(%s.xyz);", dklmdx.c_str(), v.fsIn()); |
fsBuilder->codeAppendf("%s = dFdy(%s.xyz);", dklmdy.c_str(), v.fsIn()); |
fsBuilder->codeAppendf("%s =" |