diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-01-25 04:33:07 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-25 04:33:25 +0000 |
commit | e330eb2c0e6bab83add6986119864b546bf0b0a7 (patch) | |
tree | d1249262d482be61e90d420926ccf5a1ff06aa68 /samplecode/SampleAndroidShadows.cpp | |
parent | fdb1bdf1aa4e7f14befcb3acc3f586e7734190ea (diff) |
Revert "Add geometric implementation for ambient shadows"
This reverts commit fdb1bdf1aa4e7f14befcb3acc3f586e7734190ea.
Reason for revert: Breaking the roll (see e.g. https://codereview.chromium.org/2652833006)
Original change's description:
> Add geometric implementation for ambient shadows
>
> BUG=skia:6119
>
> Change-Id: I3140522f223c35fc059a33b593064897485dff7c
> Reviewed-on: https://skia-review.googlesource.com/7273
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
>
TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6119
Change-Id: I307f6084c40e5ba305c38d15b6b433465295553c
Reviewed-on: https://skia-review.googlesource.com/7480
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'samplecode/SampleAndroidShadows.cpp')
-rw-r--r-- | samplecode/SampleAndroidShadows.cpp | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/samplecode/SampleAndroidShadows.cpp b/samplecode/SampleAndroidShadows.cpp index 8f2859282b..d9e513b5c4 100644 --- a/samplecode/SampleAndroidShadows.cpp +++ b/samplecode/SampleAndroidShadows.cpp @@ -25,8 +25,6 @@ class ShadowsView : public SampleView { SkPath fRectPath; SkPath fRRPath; SkPath fCirclePath; - SkPath fFunkyRRPath; - SkPath fCubicPath; SkPoint3 fLightPos; bool fShowAmbient; @@ -48,13 +46,6 @@ protected: fCirclePath.addCircle(0, 0, 50); fRectPath.addRect(SkRect::MakeXYWH(-100, -50, 200, 100)); fRRPath.addRRect(SkRRect::MakeRectXY(SkRect::MakeXYWH(-100, -50, 200, 100), 4, 4)); - fFunkyRRPath.addRoundRect(SkRect::MakeXYWH(-50, -50, SK_Scalar1 * 100, SK_Scalar1 * 100), - 40 * SK_Scalar1, 20 * SK_Scalar1, - SkPath::kCW_Direction); - fCubicPath.cubicTo(100 * SK_Scalar1, 50 * SK_Scalar1, - 20 * SK_Scalar1, 100 * SK_Scalar1, - 0 * SK_Scalar1, 0 * SK_Scalar1); - fLightPos = SkPoint3::Make(-700, -700, 2800); } @@ -440,20 +431,20 @@ protected: canvas->translate(200, 90); lightPos.fX += 200; lightPos.fY += 90; - this->drawShadowedPath(canvas, fRRPath, 2, paint, kAmbientAlpha, + this->drawShadowedPath(canvas, fRectPath, 2, paint, kAmbientAlpha, lightPos, kLightWidth, kSpotAlpha); paint.setColor(SK_ColorRED); canvas->translate(250, 0); lightPos.fX += 250; - this->drawShadowedPath(canvas, fRectPath, 4, paint, kAmbientAlpha, + this->drawShadowedPath(canvas, fRRPath, 4, paint, kAmbientAlpha, lightPos, kLightWidth, kSpotAlpha); paint.setColor(SK_ColorBLUE); canvas->translate(-250, 110); lightPos.fX -= 250; lightPos.fY += 110; - this->drawShadowedPath(canvas, fCirclePath, 8, paint, 0, + this->drawShadowedPath(canvas, fCirclePath, 8, paint, 0.0f, lightPos, kLightWidth, 0.5f); paint.setColor(SK_ColorGREEN); @@ -461,19 +452,6 @@ protected: lightPos.fX += 250; this->drawShadowedPath(canvas, fRRPath, 64, paint, kAmbientAlpha, lightPos, kLightWidth, kSpotAlpha); - - paint.setColor(SK_ColorYELLOW); - canvas->translate(-250, 110); - lightPos.fX -= 250; - lightPos.fY += 110; - this->drawShadowedPath(canvas, fFunkyRRPath, 8, paint, kAmbientAlpha, - lightPos, kLightWidth, kSpotAlpha); - - paint.setColor(SK_ColorCYAN); - canvas->translate(250, 0); - lightPos.fX += 250; - this->drawShadowedPath(canvas, fCubicPath, 16, paint, kAmbientAlpha, - lightPos, kLightWidth, kSpotAlpha); } protected: |