aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrOpList.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-07-17 12:27:26 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-17 12:27:31 +0000
commit4fa31782fc55c43e0ba1566034207fa18089c0e7 (patch)
tree8d4ab5aa04bcbbf57965f91f1dc3af99604770ca /src/gpu/GrOpList.cpp
parent94fee93c9b23bd1a32604753da8bef755d6c8a95 (diff)
Revert "Reduce arbitrary opList splitting when sorting"
This reverts commit 94fee93c9b23bd1a32604753da8bef755d6c8a95. Reason for revert: Android (and Chromecast) woes Original change's description: > Reduce arbitrary opList splitting when sorting > > Change-Id: I49a47672600f72dc46f27462a2c344e77a06a659 > Reviewed-on: https://skia-review.googlesource.com/141243 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Ic4fd4ab17bb15bef35dcbf852e0f8ad99ee45e8f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/141760 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrOpList.cpp')
-rw-r--r--src/gpu/GrOpList.cpp71
1 files changed, 5 insertions, 66 deletions
diff --git a/src/gpu/GrOpList.cpp b/src/gpu/GrOpList.cpp
index 12d15afe6a..b9f425576e 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
@@ -109,13 +106,11 @@ void GrOpList::addDependency(GrSurfaceProxy* dependedOn, const GrCaps& caps) {
GrOpList* opList = dependedOn->getLastOpList();
if (opList == this) {
- // self-read - presumably for dst reads. We can't make it closed in the self-read case.
+ // self-read - presumably for dst reads
} else {
this->addDependency(opList);
- // We are closing 'opList' here bc the current contents of it are what 'this' opList
- // depends on. We need a break in 'opList' so that the usage of that state has a
- // chance to execute.
+ // Can't make it closed in the self-read case
opList->makeClosed(caps);
}
}
@@ -127,78 +122,22 @@ void GrOpList::addDependency(GrSurfaceProxy* dependedOn, const GrCaps& caps) {
}
}
-bool GrOpList::dependsOn(const GrOpList* dependedOn) const {
- for (int i = 0; i < fDependencies.count(); ++i) {
- if (fDependencies[i] == dependedOn) {
- return true;
- }
- }
-
- 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();
}
#ifdef SK_DEBUG
-static const char* op_to_name(GrLoadOp op) {
- return GrLoadOp::kLoad == op ? "load" : GrLoadOp::kClear == op ? "clear" : "discard";
-}
-
void GrOpList::dump(bool printDependencies) const {
SkDebugf("--------------------------------------------------------------\n");
- SkDebugf("opListID: %d -> proxyID: %d\n", fUniqueID,
- fTarget.get() ? fTarget.get()->uniqueID().asUInt() : -1);
- SkDebugf("ColorLoadOp: %s %x StencilLoadOp: %s\n",
- op_to_name(fColorLoadOp),
- GrLoadOp::kClear == fColorLoadOp ? fLoadClearColor : 0x0,
- op_to_name(fStencilLoadOp));
+ SkDebugf("opList: %d -> RT: %d\n", fUniqueID, fTarget.get() ? fTarget.get()->uniqueID().asUInt()
+ : -1);
if (printDependencies) {
- SkDebugf("I rely On (%d): ", fDependencies.count());
+ SkDebugf("relies On (%d): ", fDependencies.count());
for (int i = 0; i < fDependencies.count(); ++i) {
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