From 39e716562e9d44696ce86d0f680f74d1a4592c2f Mon Sep 17 00:00:00 2001 From: Jim Van Verth Date: Mon, 23 Apr 2018 18:08:45 +0000 Subject: Revert "Remove ambient clamp hack for analytic shadows." This reverts commit d75b34394b5c53b0a5e8144dd28f956fbc8b90b2. Reason for revert: Breaking GMs Original change's description: > Remove ambient clamp hack for analytic shadows. > > The hack was added to make analytic ambient shadows match the geometric > ones exactly. Removing it does produce a slight difference, but it's > only visible at full black values (and then, only slightly) and this > makes room to pass a blend parameter for falloff. > > Also fixes an issue with filling out arcs in the shadow tesselator. > > Bug: skia:7486 > Change-Id: If78d0104df7e18f4320c1658af75576f6a4a8c73 > Reviewed-on: https://skia-review.googlesource.com/122580 > Reviewed-by: Brian Salomon > Commit-Queue: Jim Van Verth TBR=jvanverth@google.com,bsalomon@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia:7486 Change-Id: If0a20a358759c08a3a475d60be54a3d62ff7b6ad Reviewed-on: https://skia-review.googlesource.com/123120 Reviewed-by: Jim Van Verth --- samplecode/SampleAndroidShadows.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'samplecode/SampleAndroidShadows.cpp') diff --git a/samplecode/SampleAndroidShadows.cpp b/samplecode/SampleAndroidShadows.cpp index a5fb6fcb9f..5d4cd26956 100644 --- a/samplecode/SampleAndroidShadows.cpp +++ b/samplecode/SampleAndroidShadows.cpp @@ -206,8 +206,8 @@ protected: void onDrawContent(SkCanvas* canvas) override { this->drawBG(canvas); const SkScalar kLightWidth = 800; - const SkScalar kAmbientAlpha = 0.039f; - const SkScalar kSpotAlpha = 0.19f; + const SkScalar kAmbientAlpha = 0.1f; + const SkScalar kSpotAlpha = 0.25f; SkPaint paint; paint.setAntiAlias(true); -- cgit v1.2.3