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

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: revert two files 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
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));
}
-
« src/gpu/GrAllocator.h ('K') | « src/gpu/GrDrawState.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698