diff --git a/src/gpu/GrOpList.cpp b/src/gpu/GrOpList.cpp index 4bc22e4ed9..65d4e73fd0 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() = dependedOn; + fDependencies.push_back(dependedOn); } // Convert from a GrSurface-based dependency to a GrOpList one diff --git a/src/gpu/GrOpList.h b/src/gpu/GrOpList.h index 71a4b4c264..7a97961b19 100644 --- a/src/gpu/GrOpList.h +++ b/src/gpu/GrOpList.h @@ -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; } /* @@ -169,11 +175,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' - SkTDArray fDependencies; + SkSTArray<1, GrOpList*, true> fDependencies; // These are used rarely, most clients never produce any SkTArray> fPrepareCallbacks;