diff options
author | 2013-01-23 19:09:06 +0000 | |
---|---|---|
committer | 2013-01-23 19:09:06 +0000 | |
commit | 58f9ae1c7aa6e0a04c48ae907ad78f849ae14836 (patch) | |
tree | dca719958abd5927ba668313fe45a4bf2ad97cff /include/gpu/GrEffectStage.h | |
parent | 4dcc624ee0f546d6ff4077694892e9a294985f68 (diff) |
Revert 7342 to investigate failures.
git-svn-id: http://skia.googlecode.com/svn/trunk@7345 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu/GrEffectStage.h')
-rw-r--r-- | include/gpu/GrEffectStage.h | 58 |
1 files changed, 1 insertions, 57 deletions
diff --git a/include/gpu/GrEffectStage.h b/include/gpu/GrEffectStage.h index b561aaac25..c09cd450a7 100644 --- a/include/gpu/GrEffectStage.h +++ b/include/gpu/GrEffectStage.h @@ -20,6 +20,7 @@ class GrEffectStage { public: + GrEffectStage() : fEffectRef (NULL) { GR_DEBUGCODE(fSavedCoordChangeCnt = 0;) @@ -95,63 +96,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;) - } - - void saveFrom(const GrEffectStage& stage) { - GrAssert(!fInitialized); - if (NULL != stage.fEffectRef) { - stage.fEffectRef->get()->addRef(); - fEffect = stage.fEffectRef->get(); - fCoordChangeMatrix = stage.fCoordChangeMatrix; - } - SkDEBUGCODE(fInitialized = true;) - } - - void restoreTo(GrEffectStage* stage) { - GrAssert(fInitialized); - const GrEffectRef* oldEffectRef = stage->fEffectRef; - if (NULL != fEffect) { - stage->fEffectRef = GrEffect::CreateEffectRef(fEffect); - stage->fCoordChangeMatrix = fCoordChangeMatrix; - } else { - stage->fEffectRef = NULL; - } - SkSafeUnref(oldEffectRef); - } - - bool isEqual(const GrEffectStage& stage) const { - if (NULL == stage.fEffectRef) { - return NULL == fEffect; - } else if (NULL == fEffect) { - return false; - } - - if (!(*stage.getEffect())->isEqual(*fEffect)) { - return false; - } - - return fCoordChangeMatrix == stage.fCoordChangeMatrix; - } - - ~DeferredStage() { - if (NULL != fEffect) { - fEffect->subRef(); - } - } - private: - const GrEffect* fEffect; - SkMatrix fCoordChangeMatrix; - SkDEBUGCODE(bool fInitialized;) - }; - - /** * Gets the matrix representing all changes of coordinate system since the GrEffect was * installed in the stage. */ |