diff options
author | robertphillips <robertphillips@google.com> | 2015-10-22 05:31:32 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-22 05:31:32 -0700 |
commit | a352b14c8796c0d01ea8581c157a52c7d00973f5 (patch) | |
tree | 405855d64f5ae97b87f8fd2f2fbcf15f4be4d581 /src/gpu/GrRenderTarget.cpp | |
parent | 869c5e82a725a6928a45cd1fa6945ac783b8b3d8 (diff) |
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
Diffstat (limited to 'src/gpu/GrRenderTarget.cpp')
-rw-r--r-- | src/gpu/GrRenderTarget.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp index 75477021cf..ad56cf761f 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::overrideResolveRect(const SkIRect rect) { 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; } /////////////////////////////////////////////////////////////////////////////// |