Start filling BBH in SkRecordDraw.

This starts with a skeleton of how to calculate bounds for ops which don't have
their own bounds.  For any given Save/Restore block, we'll find the union of the
bounds of all the draws inside it (including other Save/Restore blocks), then say
those are the bounds of all non-draws in the block, including the Save and Restore.

To implement this, we keep a stack of active Save blocks.  Any time we hit a
non-drawing op ("control"), we'll add it to that Save block (implemented with a
separate stack of indices and a count of control ops in the entry on the Save
stack).  Save and SaveLayer push onto the stack, and Restore pops the stack, at
which point we can fill in the bounds for all the control ops in the block.

BUG=skia:
R=robertphillips@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/475473002
1 file changed