diff options
author | Brian Salomon <bsalomon@google.com> | 2017-03-24 16:07:20 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-24 16:07:27 +0000 |
commit | ab664fa5b5fb96dd1079c090534330ca7e8a10ef (patch) | |
tree | 4e1981c05341919dee61dbff7e8b44ac420a06d5 /samplecode | |
parent | e7c85c45c4c0a97adc6711bb12ecacc36af4ba11 (diff) |
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>
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SampleAndroidShadows.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/samplecode/SampleAndroidShadows.cpp b/samplecode/SampleAndroidShadows.cpp index fa9cb50c7b..271004ed10 100644 --- a/samplecode/SampleAndroidShadows.cpp +++ b/samplecode/SampleAndroidShadows.cpp @@ -500,8 +500,8 @@ protected: paint.setColor(SK_ColorCYAN); canvas->translate(250, 0); lightPos.fX += 250; - this->drawShadowedPath(canvas, fCubicPath, 16, paint, kAmbientAlpha, - lightPos, kLightWidth, kSpotAlpha); + this->drawShadowedPath(canvas, fCubicPath, SkTMax(1.0f, 16 + fZDelta), paint, + kAmbientAlpha, lightPos, kLightWidth, kSpotAlpha); // circular reveal SkPath tmpPath; @@ -513,7 +513,7 @@ protected: canvas->translate(-125, 60); lightPos.fX -= 125; lightPos.fY += 60; - this->drawShadowedPath(canvas, tmpPath, 32, paint, .1f, + this->drawShadowedPath(canvas, tmpPath, SkTMax(1.0f, 32 + fZDelta), paint, .1f, lightPos, kLightWidth, .5f); // perspective paths @@ -532,7 +532,7 @@ protected: lightPos = fLightPos; lightPos.fX += pivot.fX + translate.fX; lightPos.fY += pivot.fY + translate.fY; - this->drawShadowedPath(canvas, fWideRectPath, 16, paint, .1f, + this->drawShadowedPath(canvas, fWideRectPath, SkTMax(1.0f, 16 + fZDelta), paint, .1f, lightPos, kLightWidth, .5f); pivot = SkPoint::Make(fWideOvalPath.getBounds().width() / 2, @@ -547,12 +547,12 @@ protected: lightPos = fLightPos; lightPos.fX += pivot.fX + translate.fX; lightPos.fY += pivot.fY + translate.fY; - this->drawShadowedPath(canvas, fWideOvalPath, 32, paint, .1f, + this->drawShadowedPath(canvas, fWideOvalPath, SkTMax(1.0f, 32 + fZDelta), paint, .1f, lightPos, kLightWidth, .5f); } bool onAnimate(const SkAnimTimer& timer) override { - fAnimTranslate = timer.pingPong(10, 0, 200, -200); + fAnimTranslate = timer.pingPong(30, 0, 200, -200); return true; } |