[Reland] Fix NVPR assert for equivalent ovals
authorfmalita <fmalita@chromium.org>
Thu, 19 Nov 2015 04:12:56 +0000 (20:12 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 19 Nov 2015 04:12:57 +0000 (20:12 -0800)
commitfbe1c110acf218a7b2b5d378a752dc1845816d6e
tree3a708f5fbbc65f3b246a043dea364ea2957e56fb
parenta7c41c5217da2f091ae78d002c9b92c20360ab87
[Reland] Fix NVPR assert for equivalent ovals

For oval paths, GrPath ignores the point order and only uses the bounds
when building its key.  This is problematic because

1) point order is important when dashing
2) GrStencilAndCoverPathRenderer asserts that the lookup SkPath is equal
   to the cached SkPath - which is not the case for ovals with different
   directions/different point order.

With this CL we no longer use the reduced oval key when dashing, and
instead fall through to the more general path cases.  The assert is
adjusted to accommodate "equivalent" ovals (when not dashing).

Also re-enabled & updated the GpuDrawPath unit test (disabled in
https://codereview.chromium.org/1456463003/, presumably due to the use
of uninitialized SkRects).

R=bsalomon@google.com,robertphillips@google.com,cdalton@nvidia.com

Review URL: https://codereview.chromium.org/1457073002
src/gpu/GrPath.cpp
src/gpu/GrPath.h
tests/GpuDrawPathTest.cpp