Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: src/gpu/effects/GrBezierEffect.cpp

Issue 815553003: Move ViewMatrix off of drawstate (Closed) Base URL: https://skia.googlesource.com/skia.git@remove-fragment-stage
Patch Set: more cleaning Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/effects/GrBezierEffect.h ('k') | src/gpu/effects/GrBitmapTextGeoProc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrBezierEffect.cpp
diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp
index c90067d4a4142a82701dd75d86f53d4076c8743b..4ab088c6a8ec497017095b6bf4afccd9776f00d6 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;
}
« no previous file with comments | « src/gpu/effects/GrBezierEffect.h ('k') | src/gpu/effects/GrBitmapTextGeoProc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698