aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrBezierEffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/effects/GrBezierEffect.cpp')
-rw-r--r--src/gpu/effects/GrBezierEffect.cpp31
1 files changed, 20 insertions, 11 deletions
diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp
index c90067d4a4..4ab088c6a8 100644
--- a/src/gpu/effects/GrBezierEffect.cpp
+++ b/src/gpu/effects/GrBezierEffect.cpp
@@ -183,9 +183,11 @@ GrGLGeometryProcessor* GrConicEffect::createGLInstance(const GrBatchTracker& bt)
return SkNEW_ARGS(GrGLConicEffect, (*this, bt));
}
-GrConicEffect::GrConicEffect(GrColor color, uint8_t coverage, GrPrimitiveEdgeType edgeType,
- const SkMatrix& localMatrix)
- : INHERITED(color, false, localMatrix), fCoverageScale(coverage), fEdgeType(edgeType) {
+GrConicEffect::GrConicEffect(GrColor color, const SkMatrix& viewMatrix, uint8_t coverage,
+ GrPrimitiveEdgeType edgeType, const SkMatrix& localMatrix)
+ : INHERITED(color, viewMatrix, localMatrix)
+ , fCoverageScale(coverage)
+ , fEdgeType(edgeType) {
this->initClassID<GrConicEffect>();
fInPosition = &this->addVertexAttrib(GrAttribute("inPosition", kVec2f_GrVertexAttribType));
fInConicCoeffs = &this->addVertexAttrib(GrAttribute("inConicCoeffs",
@@ -228,7 +230,8 @@ GrGeometryProcessor* GrConicEffect::TestCreate(SkRandom* random,
do {
GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>(
random->nextULessThan(kGrProcessorEdgeTypeCnt));
- gp = GrConicEffect::Create(GrRandomColor(random), edgeType, caps,
+ gp = GrConicEffect::Create(GrRandomColor(random), GrProcessorUnitTest::TestMatrix(random),
+ edgeType, caps,
GrProcessorUnitTest::TestMatrix(random));
} while (NULL == gp);
return gp;
@@ -395,9 +398,11 @@ GrGLGeometryProcessor* GrQuadEffect::createGLInstance(const GrBatchTracker& bt)
return SkNEW_ARGS(GrGLQuadEffect, (*this, bt));
}
-GrQuadEffect::GrQuadEffect(GrColor color, uint8_t coverage, GrPrimitiveEdgeType edgeType,
- const SkMatrix& localMatrix)
- : INHERITED(color, false, localMatrix), fCoverageScale(coverage), fEdgeType(edgeType) {
+GrQuadEffect::GrQuadEffect(GrColor color, const SkMatrix& viewMatrix, uint8_t coverage,
+ GrPrimitiveEdgeType edgeType, const SkMatrix& localMatrix)
+ : INHERITED(color, viewMatrix, localMatrix)
+ , fCoverageScale(coverage)
+ , fEdgeType(edgeType) {
this->initClassID<GrQuadEffect>();
fInPosition = &this->addVertexAttrib(GrAttribute("inPosition", kVec2f_GrVertexAttribType));
fInHairQuadEdge = &this->addVertexAttrib(GrAttribute("inHairQuadEdge",
@@ -440,7 +445,9 @@ GrGeometryProcessor* GrQuadEffect::TestCreate(SkRandom* random,
do {
GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>(
random->nextULessThan(kGrProcessorEdgeTypeCnt));
- gp = GrQuadEffect::Create(GrRandomColor(random), edgeType, caps,
+ gp = GrQuadEffect::Create(GrRandomColor(random),
+ GrProcessorUnitTest::TestMatrix(random),
+ edgeType, caps,
GrProcessorUnitTest::TestMatrix(random));
} while (NULL == gp);
return gp;
@@ -629,8 +636,9 @@ GrGLGeometryProcessor* GrCubicEffect::createGLInstance(const GrBatchTracker& bt)
return SkNEW_ARGS(GrGLCubicEffect, (*this, bt));
}
-GrCubicEffect::GrCubicEffect(GrColor color, GrPrimitiveEdgeType edgeType)
- : INHERITED(color), fEdgeType(edgeType) {
+GrCubicEffect::GrCubicEffect(GrColor color, const SkMatrix& viewMatrix,
+ GrPrimitiveEdgeType edgeType)
+ : INHERITED(color, viewMatrix), fEdgeType(edgeType) {
this->initClassID<GrCubicEffect>();
fInPosition = &this->addVertexAttrib(GrAttribute("inPosition", kVec2f_GrVertexAttribType));
fInCubicCoeffs = &this->addVertexAttrib(GrAttribute("inCubicCoeffs",
@@ -671,7 +679,8 @@ GrGeometryProcessor* GrCubicEffect::TestCreate(SkRandom* random,
do {
GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>(
random->nextULessThan(kGrProcessorEdgeTypeCnt));
- gp = GrCubicEffect::Create(GrRandomColor(random), edgeType, caps);
+ gp = GrCubicEffect::Create(GrRandomColor(random),
+ GrProcessorUnitTest::TestMatrix(random), edgeType, caps);
} while (NULL == gp);
return gp;
}