Index: src/core/SkLightingShader.cpp |
diff --git a/src/core/SkLightingShader.cpp b/src/core/SkLightingShader.cpp |
index 02f14b34ddc9215c72070aeedc769a8f36418cd2..c393dc8c02922f4aeb3982e669d20fb4bd13cb7a 100644 |
--- a/src/core/SkLightingShader.cpp |
+++ b/src/core/SkLightingShader.cpp |
@@ -491,12 +491,13 @@ SkShader::Context* SkLightingShaderImpl::onCreateContext(const ContextRec& rec, |
sk_sp<SkShader> SkLightingShader::Make(sk_sp<SkShader> diffuseShader, |
sk_sp<SkNormalSource> normalSource, |
sk_sp<SkLights> lights) { |
- if (!diffuseShader || !normalSource) { |
+ if (!diffuseShader) { |
// TODO: Use paint's color in absence of a diffuseShader |
- // TODO: Use a default implementation of normalSource instead |
return nullptr; |
} |
robertphillips
2016/07/11 19:13:21
Hmmm, don't we just want the flat guy?
dvonbeck
2016/07/13 14:23:37
This was before i wrote the flat guy. Now that I u
robertphillips
2016/07/13 14:40:22
This doesn't look like the flat guy.
dvonbeck
2016/07/13 16:09:16
Patch 5 no longer has modifications to lighting sh
|
- |
+ if (!normalSource) { |
+ normalSource = SkNormalSource::MakeBevel(SkNormalSource::BevelType::kLinear, 0, 0); |
+ } |
return sk_make_sp<SkLightingShaderImpl>(std::move(diffuseShader), std::move(normalSource), |
std::move(lights)); |
} |