Fix for saveLayer() with filters vs. the BBox Hierarchy.
authorsenorblanco <senorblanco@chromium.org>
Mon, 14 Jul 2014 17:19:54 +0000 (10:19 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 14 Jul 2014 17:19:55 +0000 (10:19 -0700)
commit837f5321a409228a27fc710eb71c87866b820cfb
treef1f888404953c160acacc3a339bf52939962515a
parent3b72f792898237e9cec4dd095ef56169d0317f71
Fix for saveLayer() with filters vs. the BBox Hierarchy.

When building acceleration structures for SkPicture, we must transform
the primitive's bounds not only by its own SkPaint, but by the paints of
any saveLayer()s currently active above it.

We do this by pushing the SkPaint onto a stack on
saveLayer(), and popping them on restore(). We also push
a NULL paint in save(), so that the pushes and pops are
balanced.

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

Committed: https://skia.googlesource.com/skia/+/6ca0b6a46cbe9bef3e2b9b9db813ec864efd62de

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/380373003
gm/resizeimagefilter.cpp
src/core/SkBBoxRecord.cpp
src/core/SkBBoxRecord.h
tests/ImageFilterTest.cpp