Home | History | Annotate | Download | only in core

Lines Matching refs:graph

15 void SkTTopoSort_CheckAllUnmarked(const SkTDArray<T*>& graph) {
16 for (int i = 0; i < graph.count(); ++i) {
17 SkASSERT(!Traits::IsTempMarked(graph[i]));
18 SkASSERT(!Traits::WasOutput(graph[i]));
23 void SkTTopoSort_CleanExit(const SkTDArray<T*>& graph) {
24 for (int i = 0; i < graph.count(); ++i) {
25 SkASSERT(!Traits::IsTempMarked(graph[i]));
26 SkASSERT(Traits::WasOutput(graph[i]));
60 // Topologically sort the nodes in 'graph'. For this sort, when node 'i' depends
62 // A false return value means there was a loop and the contents of 'graph' will
81 bool SkTTopoSort(SkTDArray<T*>* graph) {
85 SkTTopoSort_CheckAllUnmarked<T, Traits>(*graph);
88 result.setReserve(graph->count());
90 for (int i = 0; i < graph->count(); ++i) {
91 if (Traits::WasOutput((*graph)[i])) {
98 if (!SkTTopoSort_Visit<T, Traits>((*graph)[i], &result)) {
103 SkASSERT(graph->count() == result.count());
104 graph->swap(result);
107 SkTTopoSort_CleanExit<T, Traits>(*graph);