| Index: src/gpu/GrRenderTarget.cpp
|
| diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp
|
| index e81a9cfd8382700485dc6f98463d9301b81e6e79..ad56cf761fff6e62afc5380d2532d9c82af48708 100644
|
| --- a/src/gpu/GrRenderTarget.cpp
|
| +++ b/src/gpu/GrRenderTarget.cpp
|
| @@ -11,6 +11,7 @@
|
|
|
| #include "GrContext.h"
|
| #include "GrDrawContext.h"
|
| +#include "GrDrawTarget.h"
|
| #include "GrGpu.h"
|
| #include "GrRenderTargetPriv.h"
|
| #include "GrStencilAttachment.h"
|
| @@ -56,16 +57,26 @@ 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) {
|
| + SkASSERT(fLastDrawTarget->isClosed());
|
| + }
|
| +
|
| + fLastDrawTarget = dt;
|
| +}
|
| +
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| bool GrRenderTargetPriv::attachStencilAttachment(GrStencilAttachment* stencil) {
|
|
|