Start filling BBH in SkRecordDraw.
authormtklein <mtklein@chromium.org>
Wed, 13 Aug 2014 19:58:45 +0000 (12:58 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 13 Aug 2014 19:58:45 +0000 (12:58 -0700)
commit828ce1f34b3471c108aee6ac2c39ddb90d0be11e
treeb60ae4451a8917bf9baba5968998e46190532b0d
parent536e9539b4b0f4e51a47901cbec606f96ab99521
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
src/core/SkRecordDraw.cpp