Revert "Revert "Pre-allocate some opList dependency list storage""
This reverts commit1cdbad0e3b
. Reason for revert: It seems unlikely it was this CL Original change's description: > Revert "Pre-allocate some opList dependency list storage" > > This reverts commit51066f4dc2
. > > Reason for revert: See if this is causing the TSAN failure > > Original change's description: > > Pre-allocate some opList dependency list storage > > > > There is a perf regression (mainly on the Nexus5) for the https://skia-review.googlesource.com/c/skia/+/46200 (Add method to iterate over a GrOp's GrSurfaceProxies) > > > > This is another candidate. > > > > Change-Id: I276ea44d899166a7d2e74f461f5a6c2c17a21cde > > Reviewed-on: https://skia-review.googlesource.com/46561 > > Reviewed-by: Brian Osman <brianosman@google.com> > > Commit-Queue: Robert Phillips <robertphillips@google.com> > > TBR=robertphillips@google.com,brianosman@google.com > > Change-Id: I83dea2921475e3554943178c9c441fdfb1af1c97 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://skia-review.googlesource.com/46842 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=robertphillips@google.com,brianosman@google.com Change-Id: I88caaddc8af321ac545b5d70bcc21cd0158c8614 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/46605 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
832e31f0e4
commit
73fd0d6418
@ -81,7 +81,7 @@ void GrOpList::addDependency(GrOpList* dependedOn) {
|
||||
return; // don't add duplicate dependencies
|
||||
}
|
||||
|
||||
*fDependencies.push() = dependedOn;
|
||||
fDependencies.push_back(dependedOn);
|
||||
}
|
||||
|
||||
// Convert from a GrSurface-based dependency to a GrOpList one
|
||||
|
@ -77,7 +77,13 @@ public:
|
||||
* Does this opList depend on 'dependedOn'?
|
||||
*/
|
||||
bool dependsOn(GrOpList* dependedOn) const {
|
||||
return fDependencies.find(dependedOn) >= 0;
|
||||
for (int i = 0; i < fDependencies.count(); ++i) {
|
||||
if (fDependencies[i] == dependedOn) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -173,7 +179,7 @@ private:
|
||||
uint32_t fFlags;
|
||||
|
||||
// 'this' GrOpList relies on the output of the GrOpLists in 'fDependencies'
|
||||
SkTDArray<GrOpList*> fDependencies;
|
||||
SkSTArray<1, GrOpList*, true> fDependencies;
|
||||
|
||||
// These are used rarely, most clients never produce any
|
||||
SkTArray<std::unique_ptr<GrPrepareCallback>> fPrepareCallbacks;
|
||||
|
Loading…
Reference in New Issue
Block a user