Revert "Revert "Create new inset algorithm for spot shadows""
This reverts commit e7c85c45c4c0a97adc6711bb12ecacc36af4ba11.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Create new inset algorithm for spot shadows"
>
> This reverts commit e5f5bf5175e426ebb6aa234f4387831c898f20ad.
>
> Reason for revert: Breaking a bunch of bots. e.g:
>
> https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout
>
> Original change's description:
> > Create new inset algorithm for spot shadows
> >
> > BUG=skia:
> >
> > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> > Reviewed-on: https://skia-review.googlesource.com/9875
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
> Reviewed-on: https://skia-review.googlesource.com/10112
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>
TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501
Reviewed-on: https://skia-review.googlesource.com/10113
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:07:20 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2017 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
#include "Test.h"
|
2018-06-28 20:26:50 +00:00
|
|
|
#include "SkPolyUtils.h"
|
Revert "Revert "Create new inset algorithm for spot shadows""
This reverts commit e7c85c45c4c0a97adc6711bb12ecacc36af4ba11.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Create new inset algorithm for spot shadows"
>
> This reverts commit e5f5bf5175e426ebb6aa234f4387831c898f20ad.
>
> Reason for revert: Breaking a bunch of bots. e.g:
>
> https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout
>
> Original change's description:
> > Create new inset algorithm for spot shadows
> >
> > BUG=skia:
> >
> > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> > Reviewed-on: https://skia-review.googlesource.com/9875
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
> Reviewed-on: https://skia-review.googlesource.com/10112
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>
TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501
Reviewed-on: https://skia-review.googlesource.com/10113
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:07:20 +00:00
|
|
|
|
|
|
|
DEF_TEST(InsetConvexPoly, reporter) {
|
|
|
|
SkTDArray<SkPoint> rrectPoly;
|
|
|
|
|
|
|
|
// round rect
|
|
|
|
*rrectPoly.push() = SkPoint::Make(-100, 55);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(100, 55);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(100 + 2.5f, 50 + 4.330127f);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(100 + 3.535534f, 50 + 3.535534f);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(100 + 4.330127f, 50 + 2.5f);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(105, 50);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(105, -50);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(100 + 4.330127f, -50 - 2.5f);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(100 + 3.535534f, -50 - 3.535534f);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(100 + 2.5f, -50 - 4.330127f);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(100, -55);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(-100, -55);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(-100 - 2.5f, -50 - 4.330127f);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(-100 - 3.535534f, -50 - 3.535534f);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(-100 - 4.330127f, -50 - 2.5f);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(-105, -50);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(-105, 50);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(-100 - 4.330127f, 50 + 2.5f);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(-100 - 3.535534f, 50 + 3.535534f);
|
|
|
|
*rrectPoly.push() = SkPoint::Make(-100 - 2.5f, 50 + 4.330127f);
|
2018-07-03 20:12:39 +00:00
|
|
|
REPORTER_ASSERT(reporter, SkIsConvexPolygon(rrectPoly.begin(), rrectPoly.count()));
|
Revert "Revert "Create new inset algorithm for spot shadows""
This reverts commit e7c85c45c4c0a97adc6711bb12ecacc36af4ba11.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Create new inset algorithm for spot shadows"
>
> This reverts commit e5f5bf5175e426ebb6aa234f4387831c898f20ad.
>
> Reason for revert: Breaking a bunch of bots. e.g:
>
> https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout
>
> Original change's description:
> > Create new inset algorithm for spot shadows
> >
> > BUG=skia:
> >
> > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> > Reviewed-on: https://skia-review.googlesource.com/9875
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
> Reviewed-on: https://skia-review.googlesource.com/10112
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>
TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501
Reviewed-on: https://skia-review.googlesource.com/10113
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:07:20 +00:00
|
|
|
|
|
|
|
// inset a little
|
|
|
|
SkTDArray<SkPoint> insetPoly;
|
2018-07-03 20:12:39 +00:00
|
|
|
bool result = SkInsetConvexPolygon(rrectPoly.begin(), rrectPoly.count(), 3, &insetPoly);
|
Revert "Revert "Create new inset algorithm for spot shadows""
This reverts commit e7c85c45c4c0a97adc6711bb12ecacc36af4ba11.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Create new inset algorithm for spot shadows"
>
> This reverts commit e5f5bf5175e426ebb6aa234f4387831c898f20ad.
>
> Reason for revert: Breaking a bunch of bots. e.g:
>
> https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout
>
> Original change's description:
> > Create new inset algorithm for spot shadows
> >
> > BUG=skia:
> >
> > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> > Reviewed-on: https://skia-review.googlesource.com/9875
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
> Reviewed-on: https://skia-review.googlesource.com/10112
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>
TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501
Reviewed-on: https://skia-review.googlesource.com/10113
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:07:20 +00:00
|
|
|
REPORTER_ASSERT(reporter, result);
|
2018-07-03 20:12:39 +00:00
|
|
|
REPORTER_ASSERT(reporter, SkIsConvexPolygon(insetPoly.begin(), insetPoly.count()));
|
Revert "Revert "Create new inset algorithm for spot shadows""
This reverts commit e7c85c45c4c0a97adc6711bb12ecacc36af4ba11.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Create new inset algorithm for spot shadows"
>
> This reverts commit e5f5bf5175e426ebb6aa234f4387831c898f20ad.
>
> Reason for revert: Breaking a bunch of bots. e.g:
>
> https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout
>
> Original change's description:
> > Create new inset algorithm for spot shadows
> >
> > BUG=skia:
> >
> > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> > Reviewed-on: https://skia-review.googlesource.com/9875
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
> Reviewed-on: https://skia-review.googlesource.com/10112
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>
TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501
Reviewed-on: https://skia-review.googlesource.com/10113
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:07:20 +00:00
|
|
|
|
|
|
|
// inset to rect
|
2018-07-03 20:12:39 +00:00
|
|
|
result = SkInsetConvexPolygon(rrectPoly.begin(), rrectPoly.count(), 10, &insetPoly);
|
Revert "Revert "Create new inset algorithm for spot shadows""
This reverts commit e7c85c45c4c0a97adc6711bb12ecacc36af4ba11.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Create new inset algorithm for spot shadows"
>
> This reverts commit e5f5bf5175e426ebb6aa234f4387831c898f20ad.
>
> Reason for revert: Breaking a bunch of bots. e.g:
>
> https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout
>
> Original change's description:
> > Create new inset algorithm for spot shadows
> >
> > BUG=skia:
> >
> > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> > Reviewed-on: https://skia-review.googlesource.com/9875
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
> Reviewed-on: https://skia-review.googlesource.com/10112
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>
TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501
Reviewed-on: https://skia-review.googlesource.com/10113
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:07:20 +00:00
|
|
|
REPORTER_ASSERT(reporter, result);
|
2018-07-03 20:12:39 +00:00
|
|
|
REPORTER_ASSERT(reporter, SkIsConvexPolygon(insetPoly.begin(), insetPoly.count()));
|
Revert "Revert "Create new inset algorithm for spot shadows""
This reverts commit e7c85c45c4c0a97adc6711bb12ecacc36af4ba11.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Create new inset algorithm for spot shadows"
>
> This reverts commit e5f5bf5175e426ebb6aa234f4387831c898f20ad.
>
> Reason for revert: Breaking a bunch of bots. e.g:
>
> https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout
>
> Original change's description:
> > Create new inset algorithm for spot shadows
> >
> > BUG=skia:
> >
> > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> > Reviewed-on: https://skia-review.googlesource.com/9875
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
> Reviewed-on: https://skia-review.googlesource.com/10112
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>
TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501
Reviewed-on: https://skia-review.googlesource.com/10113
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:07:20 +00:00
|
|
|
REPORTER_ASSERT(reporter, insetPoly.count() == 4);
|
|
|
|
if (insetPoly.count() == 4) {
|
|
|
|
REPORTER_ASSERT(reporter, insetPoly[0].equals(-95, 45));
|
|
|
|
REPORTER_ASSERT(reporter, insetPoly[1].equals(95, 45));
|
|
|
|
REPORTER_ASSERT(reporter, insetPoly[2].equals(95, -45));
|
|
|
|
REPORTER_ASSERT(reporter, insetPoly[3].equals(-95, -45));
|
|
|
|
}
|
|
|
|
|
|
|
|
// just to full inset
|
2017-04-11 19:29:14 +00:00
|
|
|
// fails, but outputs a line segment
|
2018-07-03 20:12:39 +00:00
|
|
|
result = SkInsetConvexPolygon(rrectPoly.begin(), rrectPoly.count(), 55, &insetPoly);
|
2017-04-11 19:29:14 +00:00
|
|
|
REPORTER_ASSERT(reporter, !result);
|
2018-07-03 20:12:39 +00:00
|
|
|
REPORTER_ASSERT(reporter, !SkIsConvexPolygon(insetPoly.begin(), insetPoly.count()));
|
2017-04-11 19:29:14 +00:00
|
|
|
REPORTER_ASSERT(reporter, insetPoly.count() == 2);
|
|
|
|
if (insetPoly.count() == 2) {
|
Revert "Revert "Create new inset algorithm for spot shadows""
This reverts commit e7c85c45c4c0a97adc6711bb12ecacc36af4ba11.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Create new inset algorithm for spot shadows"
>
> This reverts commit e5f5bf5175e426ebb6aa234f4387831c898f20ad.
>
> Reason for revert: Breaking a bunch of bots. e.g:
>
> https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout
>
> Original change's description:
> > Create new inset algorithm for spot shadows
> >
> > BUG=skia:
> >
> > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> > Reviewed-on: https://skia-review.googlesource.com/9875
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
> Reviewed-on: https://skia-review.googlesource.com/10112
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>
TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501
Reviewed-on: https://skia-review.googlesource.com/10113
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:07:20 +00:00
|
|
|
REPORTER_ASSERT(reporter, insetPoly[0].equals(-50, 0));
|
|
|
|
REPORTER_ASSERT(reporter, insetPoly[1].equals(50, 0));
|
|
|
|
}
|
|
|
|
|
|
|
|
// past full inset
|
2018-07-03 20:12:39 +00:00
|
|
|
result = SkInsetConvexPolygon(rrectPoly.begin(), rrectPoly.count(), 75, &insetPoly);
|
Revert "Revert "Create new inset algorithm for spot shadows""
This reverts commit e7c85c45c4c0a97adc6711bb12ecacc36af4ba11.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Create new inset algorithm for spot shadows"
>
> This reverts commit e5f5bf5175e426ebb6aa234f4387831c898f20ad.
>
> Reason for revert: Breaking a bunch of bots. e.g:
>
> https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout
>
> Original change's description:
> > Create new inset algorithm for spot shadows
> >
> > BUG=skia:
> >
> > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> > Reviewed-on: https://skia-review.googlesource.com/9875
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
> Reviewed-on: https://skia-review.googlesource.com/10112
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>
TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501
Reviewed-on: https://skia-review.googlesource.com/10113
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:07:20 +00:00
|
|
|
REPORTER_ASSERT(reporter, !result);
|
2018-07-23 15:23:39 +00:00
|
|
|
REPORTER_ASSERT(reporter, insetPoly.count() == 1);
|
Revert "Revert "Create new inset algorithm for spot shadows""
This reverts commit e7c85c45c4c0a97adc6711bb12ecacc36af4ba11.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Create new inset algorithm for spot shadows"
>
> This reverts commit e5f5bf5175e426ebb6aa234f4387831c898f20ad.
>
> Reason for revert: Breaking a bunch of bots. e.g:
>
> https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout
>
> Original change's description:
> > Create new inset algorithm for spot shadows
> >
> > BUG=skia:
> >
> > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> > Reviewed-on: https://skia-review.googlesource.com/9875
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
> Reviewed-on: https://skia-review.googlesource.com/10112
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>
TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501
Reviewed-on: https://skia-review.googlesource.com/10113
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:07:20 +00:00
|
|
|
|
|
|
|
// troublesome case
|
|
|
|
SkTDArray<SkPoint> clippedRRectPoly;
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(335.928101f, 428.219055f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(330.414459f, 423.034912f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(325.749084f, 417.395508f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(321.931946f, 411.300842f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(318.963074f, 404.750977f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(316.842468f, 397.745850f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(315.570068f, 390.285522f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(315.145966f, 382.369965f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(315.570068f, 374.454346f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(316.842468f, 366.994019f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(318.963074f, 359.988892f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(321.931946f, 353.439056f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(325.749084f, 347.344421f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(330.414459f, 341.705017f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(335.928101f, 336.520813f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(342.289948f, 331.791901f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(377.312134f, 331.791901f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(381.195313f, 332.532593f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(384.464935f, 334.754700f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(386.687042f, 338.024292f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(387.427765f, 341.907532f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(387.427765f, 422.832367f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(386.687042f, 426.715576f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(384.464935f, 429.985168f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(381.195313f, 432.207275f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(377.312134f, 432.947998f);
|
|
|
|
*clippedRRectPoly.push() = SkPoint::Make(342.289948f, 432.947998f);
|
2018-07-03 20:12:39 +00:00
|
|
|
REPORTER_ASSERT(reporter, SkIsConvexPolygon(clippedRRectPoly.begin(),
|
|
|
|
clippedRRectPoly.count()));
|
Revert "Revert "Create new inset algorithm for spot shadows""
This reverts commit e7c85c45c4c0a97adc6711bb12ecacc36af4ba11.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Create new inset algorithm for spot shadows"
>
> This reverts commit e5f5bf5175e426ebb6aa234f4387831c898f20ad.
>
> Reason for revert: Breaking a bunch of bots. e.g:
>
> https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout
>
> Original change's description:
> > Create new inset algorithm for spot shadows
> >
> > BUG=skia:
> >
> > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> > Reviewed-on: https://skia-review.googlesource.com/9875
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
> Reviewed-on: https://skia-review.googlesource.com/10112
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>
TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501
Reviewed-on: https://skia-review.googlesource.com/10113
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:07:20 +00:00
|
|
|
|
2018-07-03 20:12:39 +00:00
|
|
|
result = SkInsetConvexPolygon(clippedRRectPoly.begin(), clippedRRectPoly.count(), 32.3699417f,
|
Revert "Revert "Create new inset algorithm for spot shadows""
This reverts commit e7c85c45c4c0a97adc6711bb12ecacc36af4ba11.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Create new inset algorithm for spot shadows"
>
> This reverts commit e5f5bf5175e426ebb6aa234f4387831c898f20ad.
>
> Reason for revert: Breaking a bunch of bots. e.g:
>
> https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout
>
> Original change's description:
> > Create new inset algorithm for spot shadows
> >
> > BUG=skia:
> >
> > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> > Reviewed-on: https://skia-review.googlesource.com/9875
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
> Reviewed-on: https://skia-review.googlesource.com/10112
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>
TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501
Reviewed-on: https://skia-review.googlesource.com/10113
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:07:20 +00:00
|
|
|
&insetPoly);
|
|
|
|
REPORTER_ASSERT(reporter, result);
|
2018-07-03 20:12:39 +00:00
|
|
|
REPORTER_ASSERT(reporter, SkIsConvexPolygon(insetPoly.begin(), insetPoly.count()));
|
Revert "Revert "Create new inset algorithm for spot shadows""
This reverts commit e7c85c45c4c0a97adc6711bb12ecacc36af4ba11.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Create new inset algorithm for spot shadows"
>
> This reverts commit e5f5bf5175e426ebb6aa234f4387831c898f20ad.
>
> Reason for revert: Breaking a bunch of bots. e.g:
>
> https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout
>
> Original change's description:
> > Create new inset algorithm for spot shadows
> >
> > BUG=skia:
> >
> > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> > Reviewed-on: https://skia-review.googlesource.com/9875
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
> Reviewed-on: https://skia-review.googlesource.com/10112
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>
TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501
Reviewed-on: https://skia-review.googlesource.com/10113
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:07:20 +00:00
|
|
|
}
|