Index: src/gpu/effects/GrBitmapTextGeoProc.cpp |
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp |
index 28c6f0ffc482a5b3e84e9331bd059c699b528d87..594646256e58ff30db01d6e3e14fd4000965f161 100644 |
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp |
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp |
@@ -12,6 +12,7 @@ |
#include "glsl/GrGLSLGeometryProcessor.h" |
#include "glsl/GrGLSLProgramBuilder.h" |
#include "glsl/GrGLSLProgramDataManager.h" |
+#include "glsl/GrGLSLVarying.h" |
#include "glsl/GrGLSLVertexShaderBuilder.h" |
class GrGLBitmapTextGeoProc : public GrGLSLGeometryProcessor { |
@@ -23,9 +24,10 @@ public: |
GrGLSLGPBuilder* pb = args.fPB; |
GrGLSLVertexBuilder* vertBuilder = args.fVertBuilder; |
+ GrGLSLVaryingHandler* varyingHandler = args.fVaryingHandler; |
// emit attributes |
- vertBuilder->emitAttributes(cte); |
+ varyingHandler->emitAttributes(cte); |
// compute numbers to be hardcoded to convert texture coordinates from int to float |
SkASSERT(cte.numTextures() == 1); |
@@ -35,7 +37,7 @@ public: |
SkScalar recipHeight = 1.0f / atlas->height(); |
GrGLSLVertToFrag v(kVec2f_GrSLType); |
- pb->addVarying("TextureCoords", &v); |
+ varyingHandler->addVarying("TextureCoords", &v); |
vertBuilder->codeAppendf("%s = vec2(%.*f, %.*f) * %s;", v.vsOut(), |
GR_SIGNIFICANT_POW2_DECIMAL_DIG, recipWidth, |
GR_SIGNIFICANT_POW2_DECIMAL_DIG, recipHeight, |
@@ -45,7 +47,7 @@ public: |
// Setup pass through color |
if (!cte.colorIgnored()) { |
if (cte.hasVertexColor()) { |
- pb->addPassThroughAttribute(cte.inColor(), args.fOutputColor); |
+ varyingHandler->addPassThroughAttribute(cte.inColor(), args.fOutputColor); |
} else { |
this->setupUniformColor(pb, fragBuilder, args.fOutputColor, &fColorUniform); |
} |
@@ -57,6 +59,7 @@ public: |
// emit transforms |
this->emitTransforms(args.fPB, |
vertBuilder, |
+ varyingHandler, |
gpArgs->fPositionVar, |
cte.inPosition()->fName, |
cte.localMatrix(), |