Fall back on stencil clip when SW mask fails to allocate
authorcsmartdalton <csmartdalton@google.com>
Fri, 28 Oct 2016 19:01:10 +0000 (12:01 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 28 Oct 2016 19:01:10 +0000 (12:01 -0700)
commit3affdc1bcd881ccf031fe18c96a1de2b9439a393
treecfa6f8fd73dc1ddacaeb21bd3e5af658a27fe881
parentc7635fa374b87711e5ccd8222957a8fbdc772f7b
Fall back on stencil clip when SW mask fails to allocate

When generating a SW clip mask, we didn't used to verify that the
pixels had been successfully allocated. This would obviously crash
when the allocation was not successful. This change checks the
allocation first, and falls back on a stencil clip when it doesn't
succeed.

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

Review-Url: https://codereview.chromium.org/2456153003
src/gpu/GrClipStackClip.cpp