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

Unified Diff: src/gpu/GrDefaultGeoProcFactory.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/GrDefaultGeoProcFactory.h ('k') | src/gpu/GrDefaultPathRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDefaultGeoProcFactory.cpp
diff --git a/src/gpu/GrDefaultGeoProcFactory.cpp b/src/gpu/GrDefaultGeoProcFactory.cpp
index 7f557b52b58c27933e5da0b6442d2144c1e3560a..2c5117be9bbbe3ff70f7661acbefb91dccb65451 100644
--- a/src/gpu/GrDefaultGeoProcFactory.cpp
+++ b/src/gpu/GrDefaultGeoProcFactory.cpp
@@ -21,10 +21,18 @@ typedef GrDefaultGeoProcFactory Flag;
class DefaultGeoProc : public GrGeometryProcessor {
public:
- static GrGeometryProcessor* Create(GrColor color, uint8_t coverage, uint32_t gpTypeFlags,
- bool opaqueVertexColors, const SkMatrix& localMatrix) {
- return SkNEW_ARGS(DefaultGeoProc, (color, coverage, gpTypeFlags, opaqueVertexColors,
- localMatrix));
+ static GrGeometryProcessor* Create(uint32_t gpTypeFlags,
+ GrColor color,
+ const SkMatrix& viewMatrix,
+ const SkMatrix& localMatrix,
+ bool opaqueVertexColors,
+ uint8_t coverage) {
+ return SkNEW_ARGS(DefaultGeoProc, (gpTypeFlags,
+ color,
+ viewMatrix,
+ localMatrix,
+ opaqueVertexColors,
+ coverage));
}
virtual const char* name() const SK_OVERRIDE { return "DefaultGeometryProcessor"; }
@@ -166,9 +174,13 @@ public:
}
private:
- DefaultGeoProc(GrColor color, uint8_t coverage, uint32_t gpTypeFlags, bool opaqueVertexColors,
- const SkMatrix& localMatrix)
- : INHERITED(color, opaqueVertexColors, localMatrix)
+ DefaultGeoProc(uint32_t gpTypeFlags,
+ GrColor color,
+ const SkMatrix& viewMatrix,
+ const SkMatrix& localMatrix,
+ bool opaqueVertexColors,
+ uint8_t coverage)
+ : INHERITED(color, viewMatrix, localMatrix, opaqueVertexColors)
, fInPosition(NULL)
, fInColor(NULL)
, fInLocalCoords(NULL)
@@ -246,15 +258,24 @@ GrGeometryProcessor* DefaultGeoProc::TestCreate(SkRandom* random,
flags |= GrDefaultGeoProcFactory::kLocalCoord_GPType;
}
- return DefaultGeoProc::Create(GrRandomColor(random), GrRandomCoverage(random),
- flags, random->nextBool(),
- GrProcessorUnitTest::TestMatrix(random));
+ return DefaultGeoProc::Create(flags,
+ GrRandomColor(random),
+ GrProcessorUnitTest::TestMatrix(random),
+ GrProcessorUnitTest::TestMatrix(random),
+ random->nextBool(),
+ GrRandomCoverage(random));
}
-const GrGeometryProcessor* GrDefaultGeoProcFactory::Create(GrColor color,
- uint32_t gpTypeFlags,
+const GrGeometryProcessor* GrDefaultGeoProcFactory::Create(uint32_t gpTypeFlags,
+ GrColor color,
+ const SkMatrix& viewMatrix,
+ const SkMatrix& localMatrix,
bool opaqueVertexColors,
- uint8_t coverage,
- const SkMatrix& localMatrix) {
- return DefaultGeoProc::Create(color, coverage, gpTypeFlags, opaqueVertexColors, localMatrix);
+ uint8_t coverage) {
+ return DefaultGeoProc::Create(gpTypeFlags,
+ color,
+ viewMatrix,
+ localMatrix,
+ opaqueVertexColors,
+ coverage);
}
« no previous file with comments | « src/gpu/GrDefaultGeoProcFactory.h ('k') | src/gpu/GrDefaultPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698