Chromium Code Reviews| Index: gm/shadowmaps.cpp |
| diff --git a/gm/shadowmaps.cpp b/gm/shadowmaps.cpp |
| index b343d9b142221b60379c52901808e317462838d2..f247a445bef865d628486ad74fc1450b84336842 100644 |
| --- a/gm/shadowmaps.cpp |
| +++ b/gm/shadowmaps.cpp |
| @@ -76,6 +76,11 @@ public: |
| SkVector3::Make(0.1f, 0.2f, 1.0f))); |
| builder.add(SkLights::Light(SkColor3f::Make(0.4f, 0.4f, 0.4f))); |
| fLights = builder.finish(); |
| + |
| + fShType.fShadowRadius = 4.0f; |
| + fShType.fBiasingConstant = 0.3f; |
| + fShType.fMinVariance = 1024; |
| + fShType.fBlurAlgorithm = SkShadowType::kVariance_BlurAlgorithm; |
| } |
| protected: |
| @@ -95,11 +100,12 @@ protected: |
| // It's used to generate the depth maps. |
| sk_sp<SkPicture> pic(make_test_picture(kWidth, kHeight)); |
| canvas->setLights(fLights); |
| - canvas->drawShadowedPicture(pic, nullptr, nullptr); |
| + canvas->drawShadowedPicture(pic, nullptr, nullptr, fShType); |
| } |
| private: |
| sk_sp<SkLights> fLights; |
| + SkShadowType fShType; |
|
jvanverth1
2016/08/12 17:39:08
Nit: it'd be clearer to me if you wrote this out a
vjiaoblack
2016/08/12 19:07:42
Done.
|
| typedef GM INHERITED; |
| }; |