Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Unified Diff: src/gpu/GrDrawState.cpp

Issue 542723004: Make GrDrawState and GrEffectStage use the pending io/exec ref mechanisms. (Closed) Base URL: https://skia.googlesource.com/skia.git@complete
Patch Set: rebase again Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrDrawState.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawState.cpp
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index 4834811a87d3e2b2c6ff5f58410a193597d8b19f..ffec6627ca4c9687b473faf6a09ce7b21bf36da0 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -69,7 +69,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;
@@ -103,11 +105,13 @@ GrDrawState& GrDrawState::operator=(const GrDrawState& that) {
void GrDrawState::onReset(const SkMatrix* initialViewMatrix) {
SkASSERT(0 == fBlockEffectRemovalCnt || 0 == this->numTotalStages());
+ SkASSERT(!fRenderTarget.ownsPendingIO());
+
fGeometryProcessor.reset(NULL);
fColorStages.reset();
fCoverageStages.reset();
- fRenderTarget.reset(NULL);
+ fRenderTarget.reset();
this->setDefaultVertexAttribs();
@@ -609,4 +613,3 @@ bool GrDrawState::canIgnoreColorAttribute() const {
return SkToBool(fBlendOptFlags & (GrRODrawState::kEmitTransBlack_BlendOptFlag |
GrRODrawState::kEmitCoverage_BlendOptFlag));
}
-
« no previous file with comments | « src/gpu/GrDrawState.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698