Index: src/gpu/GrDrawState.h |
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h |
index ec0ccade3746dec09bb10201b03eec04c903b38d..00bec9f7c24f45e9088440bd6cdd1614e1d8764d 100644 |
--- a/src/gpu/GrDrawState.h |
+++ b/src/gpu/GrDrawState.h |
@@ -380,40 +380,6 @@ public: |
*/ |
void setRenderTarget(GrRenderTarget* target) { fRenderTarget.reset(SkSafeRef(target)); } |
- class AutoRenderTargetRestore : public ::SkNoncopyable { |
- public: |
- AutoRenderTargetRestore() : fDrawState(NULL), fSavedTarget(NULL) {} |
- AutoRenderTargetRestore(GrDrawState* ds, GrRenderTarget* newTarget) { |
- fDrawState = NULL; |
- fSavedTarget = NULL; |
- this->set(ds, newTarget); |
- } |
- ~AutoRenderTargetRestore() { this->restore(); } |
- |
- void restore() { |
- if (NULL != fDrawState) { |
- fDrawState->setRenderTarget(fSavedTarget); |
- fDrawState = NULL; |
- } |
- SkSafeSetNull(fSavedTarget); |
- } |
- |
- void set(GrDrawState* ds, GrRenderTarget* newTarget) { |
- this->restore(); |
- |
- if (NULL != ds) { |
- SkASSERT(NULL == fSavedTarget); |
- fSavedTarget = ds->getRenderTarget(); |
- SkSafeRef(fSavedTarget); |
- ds->setRenderTarget(newTarget); |
- fDrawState = ds; |
- } |
- } |
- private: |
- GrDrawState* fDrawState; |
- GrRenderTarget* fSavedTarget; |
- }; |
- |
/// @} |
/////////////////////////////////////////////////////////////////////////// |