A binning free list. Binning is important to avoid sifting through lots of small strips when allocating many texture items.
FIXME(pcwalton): Would probably be more efficient as a bit vector.
A texture allocator using the guillotine algorithm with the rectangle merge improvement. See sections 2.2 and 2.2.5 in "A Thousand Ways to Pack the Bin - A Practical Approach to Two- Dimensional Rectangle Bin Packing":
The amount of time in milliseconds we give ourselves to coalesce rects before giving up.
The number of items that we process in the coalescing work list before checking whether we hit the timeout.
The desired initial size of each texture, in pixels.
The number of bytes we're allowed to use for a texture.
The number of RGBA pixels we're allowed to use for a texture.
The minimum number of pixels on each side that we require for rects to be classified as "large" within the free list.
The minimum number of pixels on each side that we require for rects to be classified as "medium" within the free list.
The square root of the number of RGBA pixels we're allowed to use for a texture, rounded down. to the next power of two.
Returns the number of pixels on a side we start out with for our texture atlases.