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

Unified Diff: src/gpu/effects/GrBezierEffect.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/effects/GrBezierEffect.h ('k') | src/gpu/effects/GrBitmapTextGeoProc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrBezierEffect.cpp
diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp
index 041cfd7e4416bfb24e95430ea63bb8f6792b3de9..9ab3a951d64bcc5891e4e6cf260bbc1857f33105 100644
--- a/src/gpu/effects/GrBezierEffect.cpp
+++ b/src/gpu/effects/GrBezierEffect.cpp
@@ -200,11 +200,6 @@ GrConicEffect::GrConicEffect(GrColor color, const SkMatrix& viewMatrix, uint8_t
kVec4f_GrVertexAttribType));
}
-bool GrConicEffect::onIsEqual(const GrGeometryProcessor& other) const {
- const GrConicEffect& ce = other.cast<GrConicEffect>();
- return (ce.fEdgeType == fEdgeType);
-}
-
void GrConicEffect::initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const {
ConicBatchTracker* local = bt->cast<ConicBatchTracker>();
local->fInputColorType = GetColorInputType(&local->fColor, this->color(), init, false);
@@ -212,18 +207,6 @@ void GrConicEffect::initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& i
local->fUsesLocalCoords = init.fUsesLocalCoords;
}
-bool GrConicEffect::onCanMakeEqual(const GrBatchTracker& m,
- const GrGeometryProcessor& that,
- const GrBatchTracker& t) const {
- const ConicBatchTracker& mine = m.cast<ConicBatchTracker>();
- const ConicBatchTracker& theirs = t.cast<ConicBatchTracker>();
- return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords,
- that, theirs.fUsesLocalCoords) &&
- CanCombineOutput(mine.fInputColorType, mine.fColor,
- theirs.fInputColorType, theirs.fColor) &&
- mine.fCoverageScale == theirs.fCoverageScale;
-}
-
//////////////////////////////////////////////////////////////////////////////
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrConicEffect);
@@ -421,11 +404,6 @@ GrQuadEffect::GrQuadEffect(GrColor color, const SkMatrix& viewMatrix, uint8_t co
kVec4f_GrVertexAttribType));
}
-bool GrQuadEffect::onIsEqual(const GrGeometryProcessor& other) const {
- const GrQuadEffect& ce = other.cast<GrQuadEffect>();
- return (ce.fEdgeType == fEdgeType);
-}
-
void GrQuadEffect::initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const {
QuadBatchTracker* local = bt->cast<QuadBatchTracker>();
local->fInputColorType = GetColorInputType(&local->fColor, this->color(), init, false);
@@ -433,18 +411,6 @@ void GrQuadEffect::initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& in
local->fUsesLocalCoords = init.fUsesLocalCoords;
}
-bool GrQuadEffect::onCanMakeEqual(const GrBatchTracker& m,
- const GrGeometryProcessor& that,
- const GrBatchTracker& t) const {
- const QuadBatchTracker& mine = m.cast<QuadBatchTracker>();
- const QuadBatchTracker& theirs = t.cast<QuadBatchTracker>();
- return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords,
- that, theirs.fUsesLocalCoords) &&
- CanCombineOutput(mine.fInputColorType, mine.fColor,
- theirs.fInputColorType, theirs.fColor) &&
- mine.fCoverageScale == theirs.fCoverageScale;
-}
-
//////////////////////////////////////////////////////////////////////////////
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrQuadEffect);
@@ -663,28 +629,12 @@ GrCubicEffect::GrCubicEffect(GrColor color, const SkMatrix& viewMatrix,
kVec4f_GrVertexAttribType));
}
-bool GrCubicEffect::onIsEqual(const GrGeometryProcessor& other) const {
- const GrCubicEffect& ce = other.cast<GrCubicEffect>();
- return (ce.fEdgeType == fEdgeType);
-}
-
void GrCubicEffect::initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const {
CubicBatchTracker* local = bt->cast<CubicBatchTracker>();
local->fInputColorType = GetColorInputType(&local->fColor, this->color(), init, false);
local->fUsesLocalCoords = init.fUsesLocalCoords;
}
-bool GrCubicEffect::onCanMakeEqual(const GrBatchTracker& m,
- const GrGeometryProcessor& that,
- const GrBatchTracker& t) const {
- const CubicBatchTracker& mine = m.cast<CubicBatchTracker>();
- const CubicBatchTracker& theirs = t.cast<CubicBatchTracker>();
- return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords,
- that, theirs.fUsesLocalCoords) &&
- CanCombineOutput(mine.fInputColorType, mine.fColor,
- theirs.fInputColorType, theirs.fColor);
-}
-
//////////////////////////////////////////////////////////////////////////////
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrCubicEffect);
« no previous file with comments | « src/gpu/effects/GrBezierEffect.h ('k') | src/gpu/effects/GrBitmapTextGeoProc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698