Revert of Dependencies are now added between the drawTargets in GrPipeline (patchset #6 id:120001 of https://codereview.chromium.org/1414903002/ )
Reason for revert:
Breaking bots
Original issue's description:
> Dependencies are now added between the drawTargets in GrPipeline
>
> This CL relies on https://codereview.chromium.org/1414773002/ (Add the machinery to GrDrawTarget to enable topological sorting)
>
> BUG=skia:4094
>
> Committed: https://skia.googlesource.com/skia/+/45a1c34f607a970933e5cd05e1df6cd8090db1be
>
> Committed: https://skia.googlesource.com/skia/+/869c5e82a725a6928a45cd1fa6945ac783b8b3d8
TBR=bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4094
Review URL: https://codereview.chromium.org/1417263002
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp
index 7547702..ad56cf7 100644
--- a/src/gpu/GrRenderTarget.cpp
+++ b/src/gpu/GrRenderTarget.cpp
@@ -16,13 +16,6 @@
#include "GrRenderTargetPriv.h"
#include "GrStencilAttachment.h"
-GrRenderTarget::~GrRenderTarget() {
- if (fLastDrawTarget) {
- fLastDrawTarget->clearRT();
- }
- SkSafeUnref(fLastDrawTarget);
-}
-
void GrRenderTarget::discard() {
// go through context so that all necessary flushing occurs
GrContext* context = this->getContext();
@@ -64,26 +57,24 @@
void GrRenderTarget::onRelease() {
SkSafeSetNull(fStencilAttachment);
+ fLastDrawTarget = nullptr;
INHERITED::onRelease();
}
void GrRenderTarget::onAbandon() {
SkSafeSetNull(fStencilAttachment);
+ fLastDrawTarget = nullptr;
INHERITED::onAbandon();
}
void GrRenderTarget::setLastDrawTarget(GrDrawTarget* dt) {
if (fLastDrawTarget) {
- // The non-MDB world never closes so we can't check this condition
-#ifdef ENABLE_MDB
SkASSERT(fLastDrawTarget->isClosed());
-#endif
- fLastDrawTarget->clearRT();
}
- SkRefCnt_SafeAssign(fLastDrawTarget, dt);
+ fLastDrawTarget = dt;
}
///////////////////////////////////////////////////////////////////////////////