Add more trace logging.
Move pixel placement into separate function for profiling.
Memoize root regions.