Index: samplecode/SampleLitAtlas.cpp |
diff --git a/samplecode/SampleLitAtlas.cpp b/samplecode/SampleLitAtlas.cpp |
index ba42ed8761ac9ad72fadd3f6514e2805f53359d8..f1882b789021743814b01375d2a4f638a80ae4a8 100644 |
--- a/samplecode/SampleLitAtlas.cpp |
+++ b/samplecode/SampleLitAtlas.cpp |
@@ -134,8 +134,10 @@ protected: |
SkShader::kClamp_TileMode, &normalMat, nullptr); |
sk_sp<SkNormalSource> normalSource = SkNormalSource::MakeFromNormalMap( |
std::move(normalMap), m); |
- paint.setShader(SkLightingShader::Make(fAtlas, fLights, &diffMat, |
- std::move(normalSource))); |
+ sk_sp<SkShader> diffuseShader = SkBitmapProcShader::MakeBitmapShader(fAtlas, |
+ SkShader::kClamp_TileMode, SkShader::kClamp_TileMode, &diffMat); |
+ paint.setShader(SkLightingShader::Make(std::move(diffuseShader), |
+ std::move(normalSource), fLights)); |
canvas->save(); |
canvas->setMatrix(m); |