Generalize iterator in GrTAllocator to be useful for other data types

This allows the iterator type/boilerplate to be reused for any other
data collection that sits above GrBlockAllocator, as long as its a fixed
"type" with indices into a block.

Also adds reverse iteration (which is useful for stack-like use cases).

Change-Id: Id9a205e8fb396a8558e360439240fd20c92c9700
Commit-Queue: Michael Ludwig <>
Reviewed-by: Robert Phillips <>
2 files changed