Index: src/gpu/GrDrawState.cpp |
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp |
index 0c2b1c3684e295d3bb321669375a9f3d414cb4ed..d6b908213e39f62de9dc77ca392f6c25a9860e0f 100644 |
--- a/src/gpu/GrDrawState.cpp |
+++ b/src/gpu/GrDrawState.cpp |
@@ -66,7 +66,9 @@ GrDrawState::GrDrawState(const GrDrawState& state, const SkMatrix& preConcatMatr |
GrDrawState& GrDrawState::operator=(const GrDrawState& that) { |
SkASSERT(0 == fBlockEffectRemovalCnt || 0 == this->numTotalStages()); |
- this->setRenderTarget(that.fRenderTarget.get()); |
+ SkASSERT(!that.fRenderTarget.ownsPendingIO()); |
+ SkASSERT(!this->fRenderTarget.ownsPendingIO()); |
+ this->setRenderTarget(that.getRenderTarget()); |
fColor = that.fColor; |
fViewMatrix = that.fViewMatrix; |
fSrcBlend = that.fSrcBlend; |
@@ -95,10 +97,12 @@ GrDrawState& GrDrawState::operator=(const GrDrawState& that) { |
void GrDrawState::onReset(const SkMatrix* initialViewMatrix) { |
SkASSERT(0 == fBlockEffectRemovalCnt || 0 == this->numTotalStages()); |
+ SkASSERT(!fRenderTarget.ownsPendingIO()); |
+ |
fColorStages.reset(); |
fCoverageStages.reset(); |
- fRenderTarget.reset(NULL); |
+ fRenderTarget.reset(); |
this->setDefaultVertexAttribs(); |
@@ -567,4 +571,3 @@ bool GrDrawState::canIgnoreColorAttribute() const { |
return SkToBool(fBlendOptFlags & (GrRODrawState::kEmitTransBlack_BlendOptFlag | |
GrRODrawState::kEmitCoverage_BlendOptFlag)); |
} |
- |