Fix SkClipStack bug with inverse-filled difference elements
authorcsmartdalton <csmartdalton@google.com>
Fri, 22 Jul 2016 15:39:06 +0000 (08:39 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 22 Jul 2016 15:39:06 +0000 (08:39 -0700)
commitd50e2401787dc5632453293b65f8255b12450b9b
treec3ed5f0ea2ea09e325e823af2f16f1f7fc4992cf
parentaec570e2d72cbb861be18dddd1a472b93f3b87d0
Fix SkClipStack bug with inverse-filled difference elements

Previously, SkClipStack would call "setEmpty" on itself when an
inverse-filled difference element made the stack empty. This was
a problem because setEmpty would forget the element had an inverse
fill, yet leave the op as "difference". This change modifies it to
manually update the clip bounds and set the gen-ID to kEmptyGenID,
rather than calling setEmpty.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2175493002

Review-Url: https://codereview.chromium.org/2175493002
src/core/SkClipStack.cpp
tests/ClipStackTest.cpp