| Index: src/gpu/GrOvalRenderer.cpp
|
| diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp
|
| index 727ff169e8e68c952b0f87104bad72bff55f2617..d22b4628bb54c314e2368d9d46d975838d0df0ec 100644
|
| --- a/src/gpu/GrOvalRenderer.cpp
|
| +++ b/src/gpu/GrOvalRenderer.cpp
|
| @@ -173,6 +173,17 @@
|
| 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) {
|
| @@ -181,6 +192,15 @@
|
| fInCircleEdge = &this->addVertexAttrib(Attribute("inCircleEdge",
|
| kVec4f_GrVertexAttribType));
|
| 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 {
|
| @@ -348,6 +368,17 @@
|
| 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) {
|
| @@ -358,6 +389,15 @@
|
| fInEllipseRadii = &this->addVertexAttrib(Attribute("inEllipseRadii",
|
| kVec4f_GrVertexAttribType));
|
| 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 {
|
| @@ -543,6 +583,17 @@
|
| 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) {
|
| @@ -553,6 +604,15 @@
|
| fInEllipseOffsets1 = &this->addVertexAttrib(Attribute("inEllipseOffsets1",
|
| kVec2f_GrVertexAttribType));
|
| 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 {
|
|
|