Index: samplecode/SampleLighting.cpp |
diff --git a/samplecode/SampleLighting.cpp b/samplecode/SampleLighting.cpp |
index a27aa9de41b117667e030ff9c6cdd61c13e6de5a..2791c5e717e5098d3e0e51d35dc511699f09aa2a 100755 |
--- a/samplecode/SampleLighting.cpp |
+++ b/samplecode/SampleLighting.cpp |
@@ -64,9 +64,11 @@ protected: |
sk_sp<SkLights> lights(create_lights(fLightAngle, fColorFactor)); |
SkPaint paint; |
- paint.setShader(SkLightingShader::Make(fDiffuseBitmap, fNormalBitmap, |
- std::move(lights), SkVector::Make(1.0f, 0.0f), |
- nullptr, nullptr)); |
+ auto normalSource = SkLightingShader::NormalMapSource::Make(fNormalBitmap, |
+ SkVector::Make(1.0f, 0.0f), |
+ nullptr); |
+ paint.setShader(SkLightingShader::Make(fDiffuseBitmap, std::move(lights), nullptr, |
+ normalSource)); |
egdaniel
2016/06/16 13:15:08
move?
dvonbeck
2016/06/16 23:21:56
Done.
|
paint.setColor(SK_ColorBLACK); |
SkRect r = SkRect::MakeWH((SkScalar)fDiffuseBitmap.width(), |