aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-12-06 14:47:42 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-07 19:20:19 +0000
commit04460ccee50e03b89420cdaa85882a9da083fa38 (patch)
tree9c5b83a5822ac6e59cac1555f6043a0d396b6ad3 /src/gpu/ops
parente951e4a1dca5c6706b11e402838d9e14de430a05 (diff)
Make GrGLSLPrimitiveProcessor::emitTransforms take local coords as GrShaderVar.
Also remove unused position variable parameter. Change-Id: I37f98a03ac1ca750810de13b08e3ffa11e41828c Reviewed-on: https://skia-review.googlesource.com/81320 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/ops')
-rw-r--r--src/gpu/ops/GrAAConvexPathRenderer.cpp3
-rw-r--r--src/gpu/ops/GrDashOp.cpp6
-rw-r--r--src/gpu/ops/GrMSAAPathRenderer.cpp4
-rw-r--r--src/gpu/ops/GrOvalOpFactory.cpp9
-rw-r--r--src/gpu/ops/GrTextureOp.cpp3
5 files changed, 9 insertions, 16 deletions
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index 3c84b32df7..b706d68858 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -582,8 +582,7 @@ public:
this->emitTransforms(vertBuilder,
varyingHandler,
uniformHandler,
- gpArgs->fPositionVar,
- qe.fInPosition->fName,
+ qe.fInPosition->asShaderVar(),
qe.fLocalMatrix,
args.fFPCoordTransformHandler);
diff --git a/src/gpu/ops/GrDashOp.cpp b/src/gpu/ops/GrDashOp.cpp
index e87a335af0..34c1a2bc8b 100644
--- a/src/gpu/ops/GrDashOp.cpp
+++ b/src/gpu/ops/GrDashOp.cpp
@@ -910,8 +910,7 @@ void GLDashingCircleEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
this->emitTransforms(vertBuilder,
varyingHandler,
uniformHandler,
- gpArgs->fPositionVar,
- dce.inPosition()->fName,
+ dce.inPosition()->asShaderVar(),
dce.localMatrix(),
args.fFPCoordTransformHandler);
@@ -1114,8 +1113,7 @@ void GLDashingLineEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
this->emitTransforms(vertBuilder,
varyingHandler,
uniformHandler,
- gpArgs->fPositionVar,
- de.inPosition()->fName,
+ de.inPosition()->asShaderVar(),
de.localMatrix(),
args.fFPCoordTransformHandler);
diff --git a/src/gpu/ops/GrMSAAPathRenderer.cpp b/src/gpu/ops/GrMSAAPathRenderer.cpp
index 50741bc537..8097b7c73c 100644
--- a/src/gpu/ops/GrMSAAPathRenderer.cpp
+++ b/src/gpu/ops/GrMSAAPathRenderer.cpp
@@ -149,8 +149,8 @@ public:
qp.viewMatrix(), &fViewMatrixUniform);
// emit transforms
- this->emitTransforms(vsBuilder, varyingHandler, uniformHandler, gpArgs->fPositionVar,
- qp.inPosition()->fName, SkMatrix::I(),
+ this->emitTransforms(vsBuilder, varyingHandler, uniformHandler,
+ qp.inPosition()->asShaderVar(), SkMatrix::I(),
args.fFPCoordTransformHandler);
GrGLSLPPFragmentBuilder* fsBuilder = args.fFragBuilder;
diff --git a/src/gpu/ops/GrOvalOpFactory.cpp b/src/gpu/ops/GrOvalOpFactory.cpp
index a3256602af..3c4898f848 100644
--- a/src/gpu/ops/GrOvalOpFactory.cpp
+++ b/src/gpu/ops/GrOvalOpFactory.cpp
@@ -144,8 +144,7 @@ private:
this->emitTransforms(vertBuilder,
varyingHandler,
uniformHandler,
- gpArgs->fPositionVar,
- cgp.fInPosition->fName,
+ cgp.fInPosition->asShaderVar(),
cgp.fLocalMatrix,
args.fFPCoordTransformHandler);
@@ -293,8 +292,7 @@ private:
this->emitTransforms(vertBuilder,
varyingHandler,
uniformHandler,
- gpArgs->fPositionVar,
- egp.fInPosition->fName,
+ egp.fInPosition->asShaderVar(),
egp.fLocalMatrix,
args.fFPCoordTransformHandler);
@@ -437,8 +435,7 @@ private:
this->emitTransforms(vertBuilder,
varyingHandler,
uniformHandler,
- gpArgs->fPositionVar,
- diegp.fInPosition->fName,
+ diegp.fInPosition->asShaderVar(),
args.fFPCoordTransformHandler);
// for outer curve
diff --git a/src/gpu/ops/GrTextureOp.cpp b/src/gpu/ops/GrTextureOp.cpp
index f9600e5d44..79a22d83e4 100644
--- a/src/gpu/ops/GrTextureOp.cpp
+++ b/src/gpu/ops/GrTextureOp.cpp
@@ -107,8 +107,7 @@ public:
this->emitTransforms(args.fVertBuilder,
args.fVaryingHandler,
args.fUniformHandler,
- gpArgs->fPositionVar,
- textureGP.fTextureCoords.fName,
+ textureGP.fTextureCoords.asShaderVar(),
args.fFPCoordTransformHandler);
if (args.fShaderCaps->preferFlatInterpolation()) {
args.fVaryingHandler->addFlatPassThroughAttribute(&textureGP.fColors,