Use DEF_GPUTEST_FOR_*_CONTEXT macros to obtain the
test GPU context.
Makes changing the context -related classes easier,
since not all tests need to be changed.
BUG=skia:2992
Review URL: https://codereview.chromium.org/1448873002
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
Reason for revert:
Causes failures on Android and Win8:
...
( 137/1245MB 9) 73.9ms unit test GpuLayerCachec:\0\build\slave\workdir\build\skia\include\private\skuniqueptr.h:164: failed assertion "get() != pointer()"
Caught exception 2147483651 EXCEPTION_BREAKPOINT
...
Original issue's description:
> 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
>
> Committed: https://skia.googlesource.com/skia/+/f9b1577d763988ebc043ddabf80674f71571ecffTBR=bsalomon@google.com,cdalton@nvidia.com,robertphillips@google.com,fmalita@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1461913002
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
Restructure SkGpuDevice creation:
*SkSurfaceProps are optional.
*Use SkSurfaceProps to communicate DF text rather than a flag.
*Tell SkGpuDevice::Create whether RT comes from cache or not.
Review URL: https://codereview.chromium.org/848903004