Index: samplecode/SampleLitAtlas.cpp |
diff --git a/samplecode/SampleLitAtlas.cpp b/samplecode/SampleLitAtlas.cpp |
index 36955a16d851a3174cb8306ca97f611ff5933509..ae1e7237a5c7fd1fe226982f9fd4904c86b2fa1b 100644 |
--- a/samplecode/SampleLitAtlas.cpp |
+++ b/samplecode/SampleLitAtlas.cpp |
@@ -7,7 +7,7 @@ |
#include "SampleCode.h" |
#include "SkAnimTimer.h" |
-#include "SkView.h" |
+#include "SkBitmapProcShader.h" |
#include "SkCanvas.h" |
#include "SkDrawable.h" |
#include "SkLightingShader.h" |
@@ -15,6 +15,7 @@ |
#include "SkNormalSource.h" |
#include "SkRandom.h" |
#include "SkRSXform.h" |
+#include "SkView.h" |
#include "sk_tool_utils.h" |
@@ -135,8 +136,10 @@ protected: |
sk_sp<SkNormalSource> normalSource = SkNormalSource::MakeMap(fAtlas, invNormRotation, |
&normalMat); |
- 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); |