| Index: include/gpu/GrEffectStage.h
|
| diff --git a/include/gpu/GrEffectStage.h b/include/gpu/GrEffectStage.h
|
| index 8b6cb11dfc6b9f489c47175c31107455eec98b05..478ea5e4c45c2c941a7d4b517df0c26933d00ced 100644
|
| --- a/include/gpu/GrEffectStage.h
|
| +++ b/include/gpu/GrEffectStage.h
|
| @@ -31,12 +31,6 @@ public:
|
| *this = other;
|
| }
|
|
|
| - class DeferredStage;
|
| - // This constructor balances DeferredStage::saveFrom().
|
| - explicit GrEffectStage(const DeferredStage& deferredStage) {
|
| - deferredStage.restoreTo(this);
|
| - }
|
| -
|
| GrEffectStage& operator= (const GrEffectStage& other) {
|
| fCoordChangeMatrixSet = other.fCoordChangeMatrixSet;
|
| if (other.fCoordChangeMatrixSet) {
|
| @@ -121,82 +115,6 @@ public:
|
| }
|
|
|
| /**
|
| - * Used when storing a deferred GrDrawState. The DeferredStage allows resources owned by its
|
| - * GrEffect to be recycled through the cache.
|
| - */
|
| - class DeferredStage {
|
| - public:
|
| - DeferredStage() : fEffect(NULL) {
|
| - SkDEBUGCODE(fInitialized = false;)
|
| - }
|
| -
|
| - ~DeferredStage() {
|
| - if (NULL != fEffect) {
|
| - fEffect->decDeferredRefCounts();
|
| - }
|
| - }
|
| -
|
| - void saveFrom(const GrEffectStage& stage) {
|
| - SkASSERT(!fInitialized);
|
| - SkASSERT(NULL != stage.fEffectRef.get());
|
| - stage.fEffectRef->get()->incDeferredRefCounts();
|
| - fEffect = stage.fEffectRef->get();
|
| - fCoordChangeMatrixSet = stage.fCoordChangeMatrixSet;
|
| - if (fCoordChangeMatrixSet) {
|
| - fCoordChangeMatrix = stage.fCoordChangeMatrix;
|
| - }
|
| - fVertexAttribIndices[0] = stage.fVertexAttribIndices[0];
|
| - fVertexAttribIndices[1] = stage.fVertexAttribIndices[1];
|
| - SkDEBUGCODE(fInitialized = true;)
|
| - }
|
| -
|
| - void restoreTo(GrEffectStage* stage) const {
|
| - SkASSERT(fInitialized);
|
| - stage->fEffectRef.reset(GrEffect::CreateEffectRef(fEffect));
|
| - stage->fCoordChangeMatrixSet = fCoordChangeMatrixSet;
|
| - if (fCoordChangeMatrixSet) {
|
| - stage->fCoordChangeMatrix = fCoordChangeMatrix;
|
| - }
|
| - stage->fVertexAttribIndices[0] = fVertexAttribIndices[0];
|
| - stage->fVertexAttribIndices[1] = fVertexAttribIndices[1];
|
| - }
|
| -
|
| - bool isEqual(const GrEffectStage& stage, bool ignoreCoordChange) const {
|
| - if (fVertexAttribIndices[0] != stage.fVertexAttribIndices[0] ||
|
| - fVertexAttribIndices[1] != stage.fVertexAttribIndices[1]) {
|
| - return false;
|
| - }
|
| -
|
| - if (!(*stage.getEffect())->isEqual(*fEffect)) {
|
| - return false;
|
| - }
|
| -
|
| - if (ignoreCoordChange) {
|
| - // ignore the coordinate change matrix since there are
|
| - // explicit uv coordinates
|
| - return true;
|
| - }
|
| -
|
| - if (fCoordChangeMatrixSet != stage.fCoordChangeMatrixSet) {
|
| - return false;
|
| - }
|
| -
|
| - if (!fCoordChangeMatrixSet) {
|
| - return true;
|
| - }
|
| -
|
| - return fCoordChangeMatrix == stage.fCoordChangeMatrix;
|
| - }
|
| -
|
| - private:
|
| - const GrEffect* fEffect;
|
| - bool fCoordChangeMatrixSet;
|
| - SkMatrix fCoordChangeMatrix;
|
| - int fVertexAttribIndices[2];
|
| - SkDEBUGCODE(bool fInitialized;)
|
| - };
|
| -
|
| - /**
|
| * Gets the matrix representing all changes of coordinate system since the GrEffect was
|
| * installed in the stage.
|
| */
|
|
|