aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrDashingEffect.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-04-28 09:08:28 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-28 09:08:28 -0700
commitef292a0901205b9785a30daae2c036aa34a970ca (patch)
tree78df6b75ca04153409353aa488ce193bcf91de9b /src/gpu/effects/GrDashingEffect.cpp
parentcfc18867d982119d9dc2888bf09f1093012daadd (diff)
removing equality / compute invariant loops from GrGeometryProcessors
Diffstat (limited to 'src/gpu/effects/GrDashingEffect.cpp')
-rw-r--r--src/gpu/effects/GrDashingEffect.cpp64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp
index 08a3f670d9..5a9bc44995 100644
--- a/src/gpu/effects/GrDashingEffect.cpp
+++ b/src/gpu/effects/GrDashingEffect.cpp
@@ -784,8 +784,6 @@ public:
DashAAMode aaMode,
const SkMatrix& localMatrix);
- virtual ~DashingCircleEffect();
-
const char* name() const override { return "DashingCircleEffect"; }
const Attribute* inPosition() const { return fInPosition; }
@@ -805,17 +803,9 @@ public:
void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override;
- bool onCanMakeEqual(const GrBatchTracker&,
- const GrGeometryProcessor&,
- const GrBatchTracker&) const override;
-
private:
DashingCircleEffect(GrColor, DashAAMode aaMode, const SkMatrix& localMatrix);
- bool onIsEqual(const GrGeometryProcessor& other) const override;
-
- void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const override;
-
DashAAMode fAAMode;
const Attribute* fInPosition;
const Attribute* fInDashParams;
@@ -944,12 +934,6 @@ GrGeometryProcessor* DashingCircleEffect::Create(GrColor color,
return SkNEW_ARGS(DashingCircleEffect, (color, aaMode, localMatrix));
}
-DashingCircleEffect::~DashingCircleEffect() {}
-
-void DashingCircleEffect::onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const {
- out->setUnknownSingleComponent();
-}
-
void DashingCircleEffect::getGLProcessorKey(const GrBatchTracker& bt,
const GrGLSLCaps& caps,
GrProcessorKeyBuilder* b) const {
@@ -972,28 +956,12 @@ DashingCircleEffect::DashingCircleEffect(GrColor color,
kVec2f_GrVertexAttribType));
}
-bool DashingCircleEffect::onIsEqual(const GrGeometryProcessor& other) const {
- const DashingCircleEffect& dce = other.cast<DashingCircleEffect>();
- return fAAMode == dce.fAAMode;
-}
-
void DashingCircleEffect::initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const {
DashingCircleBatchTracker* local = bt->cast<DashingCircleBatchTracker>();
local->fInputColorType = GetColorInputType(&local->fColor, this->color(), init, false);
local->fUsesLocalCoords = init.fUsesLocalCoords;
}
-bool DashingCircleEffect::onCanMakeEqual(const GrBatchTracker& m,
- const GrGeometryProcessor& that,
- const GrBatchTracker& t) const {
- const DashingCircleBatchTracker& mine = m.cast<DashingCircleBatchTracker>();
- const DashingCircleBatchTracker& theirs = t.cast<DashingCircleBatchTracker>();
- return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords,
- that, theirs.fUsesLocalCoords) &&
- CanCombineOutput(mine.fInputColorType, mine.fColor,
- theirs.fInputColorType, theirs.fColor);
-}
-
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DashingCircleEffect);
GrGeometryProcessor* DashingCircleEffect::TestCreate(SkRandom* random,
@@ -1032,8 +1000,6 @@ public:
DashAAMode aaMode,
const SkMatrix& localMatrix);
- virtual ~DashingLineEffect();
-
const char* name() const override { return "DashingEffect"; }
const Attribute* inPosition() const { return fInPosition; }
@@ -1053,17 +1019,9 @@ public:
void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const override;
- bool onCanMakeEqual(const GrBatchTracker&,
- const GrGeometryProcessor&,
- const GrBatchTracker&) const override;
-
private:
DashingLineEffect(GrColor, DashAAMode aaMode, const SkMatrix& localMatrix);
- bool onIsEqual(const GrGeometryProcessor& other) const override;
-
- void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const override;
-
DashAAMode fAAMode;
const Attribute* fInPosition;
const Attribute* fInDashParams;
@@ -1204,12 +1162,6 @@ GrGeometryProcessor* DashingLineEffect::Create(GrColor color,
return SkNEW_ARGS(DashingLineEffect, (color, aaMode, localMatrix));
}
-DashingLineEffect::~DashingLineEffect() {}
-
-void DashingLineEffect::onGetInvariantOutputCoverage(GrInitInvariantOutput* out) const {
- out->setUnknownSingleComponent();
-}
-
void DashingLineEffect::getGLProcessorKey(const GrBatchTracker& bt,
const GrGLSLCaps& caps,
GrProcessorKeyBuilder* b) const {
@@ -1231,28 +1183,12 @@ DashingLineEffect::DashingLineEffect(GrColor color,
fInRectParams = &this->addVertexAttrib(Attribute("inRect", kVec4f_GrVertexAttribType));
}
-bool DashingLineEffect::onIsEqual(const GrGeometryProcessor& other) const {
- const DashingLineEffect& de = other.cast<DashingLineEffect>();
- return fAAMode == de.fAAMode;
-}
-
void DashingLineEffect::initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const {
DashingLineBatchTracker* local = bt->cast<DashingLineBatchTracker>();
local->fInputColorType = GetColorInputType(&local->fColor, this->color(), init, false);
local->fUsesLocalCoords = init.fUsesLocalCoords;
}
-bool DashingLineEffect::onCanMakeEqual(const GrBatchTracker& m,
- const GrGeometryProcessor& that,
- const GrBatchTracker& t) const {
- const DashingLineBatchTracker& mine = m.cast<DashingLineBatchTracker>();
- const DashingLineBatchTracker& theirs = t.cast<DashingLineBatchTracker>();
- return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords,
- that, theirs.fUsesLocalCoords) &&
- CanCombineOutput(mine.fInputColorType, mine.fColor,
- theirs.fInputColorType, theirs.fColor);
-}
-
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DashingLineEffect);
GrGeometryProcessor* DashingLineEffect::TestCreate(SkRandom* random,