aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrDrawingManager.cpp42
-rw-r--r--src/gpu/GrOpList.cpp41
-rw-r--r--src/gpu/GrRenderTargetOpList.h3
3 files changed, 10 insertions, 76 deletions
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 366f285cf3..8b0fb22f6b 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -427,22 +427,11 @@ sk_sp<GrRenderTargetOpList> GrDrawingManager::newRTOpList(GrRenderTargetProxy* r
SkASSERT(fContext);
if (!fOpLists.empty()) {
- if (fSortRenderTargets) {
- // In this case we need to close all the opLists that rely on the current contents of
- // 'rtp'. That is bc we're going to update the content of the proxy so they need to be
- // split in case they use both the old and new content. (This is a bit of an overkill:
- // they really only need to be split if they ever reference proxy's contents again but
- // that is hard to predict/handle).
- if (GrOpList* lastOpList = rtp->getLastOpList()) {
- lastOpList->closeThoseWhoDependOnMe(*fContext->contextPriv().caps());
- }
- } else {
- // This is a temporary fix for the partial-MDB world. In that world we're not
- // reordering so ops that (in the single opList world) would've just glommed onto the
- // end of the single opList but referred to a far earlier RT need to appear in their
- // own opList.
- fOpLists.back()->makeClosed(*fContext->contextPriv().caps());
- }
+ // This is a temporary fix for the partial-MDB world. In that world we're not
+ // reordering so ops that (in the single opList world) would've just glommed onto the
+ // end of the single opList but referred to a far earlier RT need to appear in their
+ // own opList.
+ fOpLists.back()->makeClosed(*fContext->contextPriv().caps());
}
auto resourceProvider = fContext->contextPriv().resourceProvider();
@@ -465,22 +454,11 @@ sk_sp<GrTextureOpList> GrDrawingManager::newTextureOpList(GrTextureProxy* textur
SkASSERT(fContext);
if (!fOpLists.empty()) {
- if (fSortRenderTargets) {
- // In this case we need to close all the opLists that rely on the current contents of
- // 'rtp'. That is bc we're going to update the content of the proxy so they need to be
- // split in case they use both the old and new content. (This is a bit of an overkill:
- // they really only need to be split if they ever reference proxy's contents again but
- // that is hard to predict/handle).
- if (GrOpList* lastOpList = textureProxy->getLastOpList()) {
- lastOpList->closeThoseWhoDependOnMe(*fContext->contextPriv().caps());
- }
- } else {
- // This is a temporary fix for the partial-MDB world. In that world we're not
- // reordering so ops that (in the single opList world) would've just glommed onto the
- // end of the single opList but referred to a far earlier RT need to appear in their
- // own opList.
- fOpLists.back()->makeClosed(*fContext->contextPriv().caps());
- }
+ // This is a temporary fix for the partial-MDB world. In that world we're not
+ // reordering so ops that (in the single opList world) would've just glommed onto the
+ // end of the single opList but referred to a far earlier RT need to appear in their
+ // own opList.
+ fOpLists.back()->makeClosed(*fContext->contextPriv().caps());
}
sk_sp<GrTextureOpList> opList(new GrTextureOpList(fContext->contextPriv().resourceProvider(),
diff --git a/src/gpu/GrOpList.cpp b/src/gpu/GrOpList.cpp
index 12d15afe6a..313c38f14c 100644
--- a/src/gpu/GrOpList.cpp
+++ b/src/gpu/GrOpList.cpp
@@ -96,9 +96,6 @@ void GrOpList::addDependency(GrOpList* dependedOn) {
}
fDependencies.push_back(dependedOn);
- dependedOn->addDependent(this);
-
- SkDEBUGCODE(this->validate());
}
// Convert from a GrSurface-based dependency to a GrOpList one
@@ -137,38 +134,6 @@ bool GrOpList::dependsOn(const GrOpList* dependedOn) const {
return false;
}
-void GrOpList::addDependent(GrOpList* dependent) {
- fDependents.push_back(dependent);
-}
-
-#ifdef SK_DEBUG
-bool GrOpList::isDependedent(const GrOpList* dependent) const {
- for (int i = 0; i < fDependents.count(); ++i) {
- if (fDependents[i] == dependent) {
- return true;
- }
- }
-
- return false;
-}
-
-void GrOpList::validate() const {
- // TODO: check for loops and duplicates
-
- for (int i = 0; i < fDependencies.count(); ++i) {
- SkASSERT(fDependencies[i]->isDependedent(this));
- }
-}
-#endif
-
-void GrOpList::closeThoseWhoDependOnMe(const GrCaps& caps) {
- for (int i = 0; i < fDependents.count(); ++i) {
- if (!fDependents[i]->isClosed()) {
- fDependents[i]->makeClosed(caps);
- }
- }
-}
-
bool GrOpList::isInstantiated() const {
return fTarget.get()->priv().isInstantiated();
}
@@ -193,12 +158,6 @@ void GrOpList::dump(bool printDependencies) const {
SkDebugf("%d, ", fDependencies[i]->fUniqueID);
}
SkDebugf("\n");
-
- SkDebugf("(%d) Rely On Me: ", fDependents.count());
- for (int i = 0; i < fDependents.count(); ++i) {
- SkDebugf("%d, ", fDependents[i]->fUniqueID);
- }
- SkDebugf("\n");
}
}
#endif
diff --git a/src/gpu/GrRenderTargetOpList.h b/src/gpu/GrRenderTargetOpList.h
index 81bd6f16e4..8629a7cb1f 100644
--- a/src/gpu/GrRenderTargetOpList.h
+++ b/src/gpu/GrRenderTargetOpList.h
@@ -87,9 +87,6 @@ public:
op->visitProxies(addDependency);
clip.visitProxies(addDependency);
- if (dstProxy.proxy()) {
- addDependency(dstProxy.proxy());
- }
return this->recordOp(std::move(op), caps, clip.doesClip() ? &clip : nullptr, &dstProxy);
}