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

Unified Diff: src/gpu/GrRODrawState.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/GrRODrawState.cpp
diff --git a/src/gpu/GrRODrawState.cpp b/src/gpu/GrRODrawState.cpp
index 9118d0dc8dc037af8d5fe1fe3ca7e92cb6c68569..854fb8345ee588babd0978c4b86efc2dd3a50f5a 100644
--- a/src/gpu/GrRODrawState.cpp
+++ b/src/gpu/GrRODrawState.cpp
@@ -16,7 +16,7 @@ bool GrRODrawState::isEqual(const GrRODrawState& that) const {
return false;
}
- if (this->fRenderTarget.get() != that.fRenderTarget.get() ||
+ if (this->getRenderTarget() != that.getRenderTarget() ||
this->fColorStages.count() != that.fColorStages.count() ||
this->fCoverageStages.count() != that.fCoverageStages.count() ||
!this->fViewMatrix.cheapEqualTo(that.fViewMatrix) ||
@@ -165,3 +165,13 @@ bool GrRODrawState::canTweakAlphaForCoverage() const {
this->isCoverageDrawing();
}
+void GrRODrawState::convertToPendingExec() {
+ fRenderTarget.markPendingIO();
+ fRenderTarget.removeRef();
+ for (int i = 0; i < fColorStages.count(); ++i) {
+ fColorStages[i].convertToPendingExec();
+ }
+ for (int i = 0; i < fCoverageStages.count(); ++i) {
+ fCoverageStages[i].convertToPendingExec();
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698