GrTopoSort operates on SkSpan instead of SkTArray.

This allows a caller to processes graphs in partitions so long as each
partition only depends on partitions that have already been processed.

Additionally an "offset" parameter is added so that Output() can see
the position in the overall graph array rather than within the SkSpan.

Bug: skia:12720
Change-Id: I36f9b1a2158fea2e6021dcfdce44454b2a094428
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/566443
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
5 files changed