diff options
author | 2017-09-14 22:14:14 +0000 | |
---|---|---|
committer | 2017-09-14 22:14:22 +0000 | |
commit | 1cdbad0e3b0af82cc064764e2a599651729fc8a3 (patch) | |
tree | 0fc517d3f55ed79329ecdac43b8c4b20bfc5375d /src/gpu | |
parent | 51066f4dc2c4905e8c6691908025dbef5f85c5b6 (diff) |
Revert "Pre-allocate some opList dependency list storage"
This reverts commit 51066f4dc2c4905e8c6691908025dbef5f85c5b6.
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>
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrOpList.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrOpList.h | 14 |
2 files changed, 5 insertions, 11 deletions
diff --git a/src/gpu/GrOpList.cpp b/src/gpu/GrOpList.cpp index 65d4e73fd0..4bc22e4ed9 100644 --- a/src/gpu/GrOpList.cpp +++ b/src/gpu/GrOpList.cpp @@ -81,7 +81,7 @@ void GrOpList::addDependency(GrOpList* dependedOn) { return; // don't add duplicate dependencies } - fDependencies.push_back(dependedOn); + *fDependencies.push() = dependedOn; } // Convert from a GrSurface-based dependency to a GrOpList one diff --git a/src/gpu/GrOpList.h b/src/gpu/GrOpList.h index 7a97961b19..71a4b4c264 100644 --- a/src/gpu/GrOpList.h +++ b/src/gpu/GrOpList.h @@ -77,13 +77,7 @@ public: * Does this opList depend on 'dependedOn'? */ bool dependsOn(GrOpList* dependedOn) const { - for (int i = 0; i < fDependencies.count(); ++i) { - if (fDependencies[i] == dependedOn) { - return true; - } - } - - return false; + return fDependencies.find(dependedOn) >= 0; } /* @@ -175,11 +169,11 @@ private: void addDependency(GrOpList* dependedOn); - uint32_t fUniqueID; - uint32_t fFlags; + uint32_t fUniqueID; + uint32_t fFlags; // 'this' GrOpList relies on the output of the GrOpLists in 'fDependencies' - SkSTArray<1, GrOpList*, true> fDependencies; + SkTDArray<GrOpList*> fDependencies; // These are used rarely, most clients never produce any SkTArray<std::unique_ptr<GrPrepareCallback>> fPrepareCallbacks; |