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

Unified Diff: src/gpu/GrOvalRenderer.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/GrGeometryProcessor.cpp ('k') | src/gpu/GrRectBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrOvalRenderer.cpp
diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp
index b5621674248cdc548ee19aa2a9afadd29d97d04c..fb18d08a2d70dee3ad4ac2f07e1a97b2c8168053 100644
--- a/src/gpu/GrOvalRenderer.cpp
+++ b/src/gpu/GrOvalRenderer.cpp
@@ -174,17 +174,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);
- }
-
private:
CircleEdgeEffect(GrColor color, bool stroke, const SkMatrix& localMatrix)
: INHERITED(color, SkMatrix::I(), localMatrix) {
@@ -195,15 +184,6 @@ private:
fStroke = stroke;
}
- bool onIsEqual(const GrGeometryProcessor& other) const override {
- const CircleEdgeEffect& cee = other.cast<CircleEdgeEffect>();
- return cee.fStroke == fStroke;
- }
-
- void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
- out->setUnknownSingleComponent();
- }
-
struct BatchTracker {
GrGPInput fInputColorType;
GrColor fColor;
@@ -369,17 +349,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);
- }
-
private:
EllipseEdgeEffect(GrColor color, bool stroke, const SkMatrix& localMatrix)
: INHERITED(color, SkMatrix::I(), localMatrix) {
@@ -392,15 +361,6 @@ private:
fStroke = stroke;
}
- bool onIsEqual(const GrGeometryProcessor& other) const override {
- const EllipseEdgeEffect& eee = other.cast<EllipseEdgeEffect>();
- return eee.fStroke == fStroke;
- }
-
- void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
- out->setUnknownSingleComponent();
- }
-
struct BatchTracker {
GrGPInput fInputColorType;
GrColor fColor;
@@ -584,17 +544,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);
- }
-
private:
DIEllipseEdgeEffect(GrColor color, const SkMatrix& viewMatrix, Mode mode)
: INHERITED(color, viewMatrix) {
@@ -607,15 +556,6 @@ private:
fMode = mode;
}
- bool onIsEqual(const GrGeometryProcessor& other) const override {
- const DIEllipseEdgeEffect& eee = other.cast<DIEllipseEdgeEffect>();
- return eee.fMode == fMode;
- }
-
- void onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const override {
- out->setUnknownSingleComponent();
- }
-
struct BatchTracker {
GrGPInput fInputColorType;
GrColor fColor;
« no previous file with comments | « src/gpu/GrGeometryProcessor.cpp ('k') | src/gpu/GrRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698