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

Unified Diff: src/gpu/effects/GrDistanceFieldGeoProc.cpp

Issue 1332923003: Remove batchtracker (Closed) Base URL: https://skia.googlesource.com/skia.git@latecreatepathprocessor
Patch Set: tweaks Created 5 years, 3 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
Index: src/gpu/effects/GrDistanceFieldGeoProc.cpp
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
index f29bab5de27c0bb9fdd1552d1fca549e2c057a00..77bbd77573d5e1bd4ac7cb72b92a36eace110058 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
@@ -21,8 +21,7 @@
class GrGLDistanceFieldA8TextGeoProc : public GrGLGeometryProcessor {
public:
- GrGLDistanceFieldA8TextGeoProc(const GrGeometryProcessor&,
- const GrBatchTracker&)
+ GrGLDistanceFieldA8TextGeoProc()
: fViewMatrix(SkMatrix::InvalidMatrix())
, fColor(GrColor_ILLEGAL)
#ifdef SK_GAMMA_APPLY_TO_A8
@@ -145,8 +144,7 @@ public:
}
virtual void setData(const GrGLProgramDataManager& pdman,
bsalomon 2015/09/10 18:55:32 one line? -virtual?
joshualitt 2015/09/10 20:08:06 Acknowledged.
- const GrPrimitiveProcessor& proc,
- const GrBatchTracker& bt) override {
+ const GrPrimitiveProcessor& proc) override {
#ifdef SK_GAMMA_APPLY_TO_A8
const GrDistanceFieldA8TextGeoProc& dfTexEffect = proc.cast<GrDistanceFieldA8TextGeoProc>();
float distanceAdjust = dfTexEffect.getDistanceAdjust();
@@ -173,7 +171,6 @@ public:
}
static inline void GenKey(const GrGeometryProcessor& gp,
- const GrBatchTracker& bt,
const GrGLSLCaps&,
GrProcessorKeyBuilder* b) {
const GrDistanceFieldA8TextGeoProc& dfTexEffect = gp.cast<GrDistanceFieldA8TextGeoProc>();
@@ -236,16 +233,14 @@ GrDistanceFieldA8TextGeoProc::GrDistanceFieldA8TextGeoProc(GrColor color,
this->addTextureAccess(&fTextureAccess);
}
-void GrDistanceFieldA8TextGeoProc::getGLProcessorKey(const GrBatchTracker& bt,
- const GrGLSLCaps& caps,
+void GrDistanceFieldA8TextGeoProc::getGLProcessorKey(const GrGLSLCaps& caps,
GrProcessorKeyBuilder* b) const {
- GrGLDistanceFieldA8TextGeoProc::GenKey(*this, bt, caps, b);
+ GrGLDistanceFieldA8TextGeoProc::GenKey(*this, caps, b);
}
GrGLPrimitiveProcessor*
bsalomon 2015/09/10 18:55:32 one line?
-GrDistanceFieldA8TextGeoProc::createGLInstance(const GrBatchTracker& bt,
- const GrGLSLCaps&) const {
- return new GrGLDistanceFieldA8TextGeoProc(*this, bt);
+GrDistanceFieldA8TextGeoProc::createGLInstance(const GrGLSLCaps&) const {
+ return new GrGLDistanceFieldA8TextGeoProc();
}
///////////////////////////////////////////////////////////////////////////////
@@ -282,8 +277,7 @@ const GrGeometryProcessor* GrDistanceFieldA8TextGeoProc::TestCreate(GrProcessorT
class GrGLDistanceFieldPathGeoProc : public GrGLGeometryProcessor {
public:
- GrGLDistanceFieldPathGeoProc(const GrGeometryProcessor&,
- const GrBatchTracker&)
+ GrGLDistanceFieldPathGeoProc()
: fViewMatrix(SkMatrix::InvalidMatrix())
, fColor(GrColor_ILLEGAL)
, fTextureSize(SkISize::Make(-1, -1)) {}
@@ -379,8 +373,7 @@ public:
}
virtual void setData(const GrGLProgramDataManager& pdman,
bsalomon 2015/09/10 18:55:32 one line? -virtual?
joshualitt 2015/09/10 20:08:06 Acknowledged.
- const GrPrimitiveProcessor& proc,
- const GrBatchTracker& bt) override {
+ const GrPrimitiveProcessor& proc) override {
SkASSERT(fTextureSizeUni.isValid());
GrTexture* texture = proc.texture(0);
@@ -410,7 +403,6 @@ public:
}
static inline void GenKey(const GrGeometryProcessor& gp,
- const GrBatchTracker& bt,
const GrGLSLCaps&,
GrProcessorKeyBuilder* b) {
const GrDistanceFieldPathGeoProc& dfTexEffect = gp.cast<GrDistanceFieldPathGeoProc>();
@@ -460,15 +452,14 @@ GrDistanceFieldPathGeoProc::GrDistanceFieldPathGeoProc(
this->addTextureAccess(&fTextureAccess);
}
-void GrDistanceFieldPathGeoProc::getGLProcessorKey(const GrBatchTracker& bt,
- const GrGLSLCaps& caps,
+void GrDistanceFieldPathGeoProc::getGLProcessorKey(const GrGLSLCaps& caps,
GrProcessorKeyBuilder* b) const {
- GrGLDistanceFieldPathGeoProc::GenKey(*this, bt, caps, b);
+ GrGLDistanceFieldPathGeoProc::GenKey(*this, caps, b);
}
GrGLPrimitiveProcessor*
bsalomon 2015/09/10 18:55:32 one line?
joshualitt 2015/09/10 20:08:06 Acknowledged.
-GrDistanceFieldPathGeoProc::createGLInstance(const GrBatchTracker& bt, const GrGLSLCaps&) const {
- return new GrGLDistanceFieldPathGeoProc(*this, bt);
+GrDistanceFieldPathGeoProc::createGLInstance(const GrGLSLCaps&) const {
+ return new GrGLDistanceFieldPathGeoProc();
}
///////////////////////////////////////////////////////////////////////////////
@@ -503,7 +494,7 @@ const GrGeometryProcessor* GrDistanceFieldPathGeoProc::TestCreate(GrProcessorTes
class GrGLDistanceFieldLCDTextGeoProc : public GrGLGeometryProcessor {
public:
- GrGLDistanceFieldLCDTextGeoProc(const GrGeometryProcessor&, const GrBatchTracker&)
+ GrGLDistanceFieldLCDTextGeoProc()
: fViewMatrix(SkMatrix::InvalidMatrix()), fColor(GrColor_ILLEGAL) {
fDistanceAdjust = GrDistanceFieldLCDTextGeoProc::DistanceAdjust::Make(1.0f, 1.0f, 1.0f);
}
@@ -651,8 +642,7 @@ public:
}
virtual void setData(const GrGLProgramDataManager& pdman,
bsalomon 2015/09/10 18:55:32 one line? -virtual?
joshualitt 2015/09/10 20:08:06 Acknowledged.
- const GrPrimitiveProcessor& processor,
- const GrBatchTracker& bt) override {
+ const GrPrimitiveProcessor& processor) override {
SkASSERT(fDistanceAdjustUni.isValid());
const GrDistanceFieldLCDTextGeoProc& dflcd = processor.cast<GrDistanceFieldLCDTextGeoProc>();
@@ -681,7 +671,6 @@ public:
}
static inline void GenKey(const GrGeometryProcessor& gp,
- const GrBatchTracker& bt,
const GrGLSLCaps&,
GrProcessorKeyBuilder* b) {
const GrDistanceFieldLCDTextGeoProc& dfTexEffect = gp.cast<GrDistanceFieldLCDTextGeoProc>();
@@ -732,16 +721,14 @@ GrDistanceFieldLCDTextGeoProc::GrDistanceFieldLCDTextGeoProc(
this->addTextureAccess(&fTextureAccess);
}
-void GrDistanceFieldLCDTextGeoProc::getGLProcessorKey(const GrBatchTracker& bt,
- const GrGLSLCaps& caps,
+void GrDistanceFieldLCDTextGeoProc::getGLProcessorKey(const GrGLSLCaps& caps,
GrProcessorKeyBuilder* b) const {
- GrGLDistanceFieldLCDTextGeoProc::GenKey(*this, bt, caps, b);
+ GrGLDistanceFieldLCDTextGeoProc::GenKey(*this, caps, b);
}
GrGLPrimitiveProcessor*
bsalomon 2015/09/10 18:55:32 one line?
joshualitt 2015/09/10 20:08:06 Acknowledged.
-GrDistanceFieldLCDTextGeoProc::createGLInstance(const GrBatchTracker& bt,
- const GrGLSLCaps&) const {
- return new GrGLDistanceFieldLCDTextGeoProc(*this, bt);
+GrDistanceFieldLCDTextGeoProc::createGLInstance(const GrGLSLCaps&) const {
+ return new GrGLDistanceFieldLCDTextGeoProc();
}
///////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698