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

Unified Diff: src/gpu/GrDefaultGeoProcFactory.cpp

Issue 1111603004: removing equality / compute invariant loops from GrGeometryProcessors (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup1
Patch Set: tweaks Created 5 years, 7 months 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.cpp » ('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 1996d77d799abcfed655aed95cfdc4d79d8089ef..0734464284a8c0f60e06cab9cc72921ce64fc83c 100644
--- a/src/gpu/GrDefaultGeoProcFactory.cpp
+++ b/src/gpu/GrDefaultGeoProcFactory.cpp
@@ -24,13 +24,11 @@ public:
GrColor color,
const SkMatrix& viewMatrix,
const SkMatrix& localMatrix,
- bool opaqueVertexColors,
uint8_t coverage) {
return SkNEW_ARGS(DefaultGeoProc, (gpTypeFlags,
color,
viewMatrix,
localMatrix,
- opaqueVertexColors,
coverage));
}
@@ -63,19 +61,6 @@ public:
local->fUsesLocalCoords = init.fUsesLocalCoords;
}
- bool onCanMakeEqual(const GrBatchTracker& m,
- const GrGeometryProcessor& that,
- const GrBatchTracker& t) const override {
- const BatchTracker& mine = m.cast<BatchTracker>();
- const BatchTracker& theirs = t.cast<BatchTracker>();
- return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords,
- that, theirs.fUsesLocalCoords) &&
- CanCombineOutput(mine.fInputColorType, mine.fColor,
- theirs.fInputColorType, theirs.fColor) &&
- CanCombineOutput(mine.fInputCoverageType, mine.fCoverage,
- theirs.fInputCoverageType, theirs.fCoverage);
- }
-
class GLProcessor : public GrGLGeometryProcessor {
public:
GLProcessor(const GrGeometryProcessor& gp, const GrBatchTracker&)
@@ -182,9 +167,8 @@ private:
GrColor color,
const SkMatrix& viewMatrix,
const SkMatrix& localMatrix,
- bool opaqueVertexColors,
uint8_t coverage)
- : INHERITED(color, viewMatrix, localMatrix, opaqueVertexColors)
+ : INHERITED(color, viewMatrix, localMatrix)
, fInPosition(NULL)
, fInColor(NULL)
, fInLocalCoords(NULL)
@@ -198,7 +182,6 @@ private:
fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertexAttribType));
if (hasColor) {
fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVertexAttribType));
- this->setHasVertexColor();
}
if (hasLocalCoord) {
fInLocalCoords = &this->addVertexAttrib(Attribute("inLocalCoord",
@@ -211,20 +194,6 @@ private:
}
}
- bool onIsEqual(const GrGeometryProcessor& other) const override {
- const DefaultGeoProc& gp = other.cast<DefaultGeoProc>();
- return gp.fFlags == this->fFlags;
- }
-
- void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
- if (fInCoverage) {
- out->setUnknownSingleComponent();
- } else {
- // uniform coverage
- out->setKnownSingleComponent(this->coverage());
- }
- }
-
struct BatchTracker {
GrGPInput fInputColorType;
GrGPInput fInputCoverageType;
@@ -266,7 +235,6 @@ GrGeometryProcessor* DefaultGeoProc::TestCreate(SkRandom* random,
GrRandomColor(random),
GrTest::TestMatrix(random),
GrTest::TestMatrix(random),
- random->nextBool(),
GrRandomCoverage(random));
}
@@ -274,12 +242,10 @@ const GrGeometryProcessor* GrDefaultGeoProcFactory::Create(uint32_t gpTypeFlags,
GrColor color,
const SkMatrix& viewMatrix,
const SkMatrix& localMatrix,
- bool opaqueVertexColors,
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.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698