Chromium Code Reviews| Index: gm/lightingshader.cpp |
| diff --git a/gm/lightingshader.cpp b/gm/lightingshader.cpp |
| index ae6a24f9f0c3ce895aeae048f022c53ce0504daf..5bd94daf8aff1e7f51d2e04510403dd2a2d0ff72 100644 |
| --- a/gm/lightingshader.cpp |
| +++ b/gm/lightingshader.cpp |
| @@ -99,8 +99,9 @@ protected: |
| SkVector invNormRotation = { ctm[SkMatrix::kMScaleX], ctm[SkMatrix::kMSkewY] }; |
| SkPaint paint; |
| - paint.setShader(SkLightingShader::Make(fDiffuse, fNormalMaps[mapType], fLights, |
| - invNormRotation, &matrix, &matrix)); |
| + auto normalSource = SkLightingShader::NormalMapSource::Make(fNormalMaps[mapType], |
| + invNormRotation, &matrix); |
| + paint.setShader(SkLightingShader::Make(fDiffuse, fLights, &matrix, normalSource)); |
|
egdaniel
2016/06/16 13:15:08
should this be a move here of normal source?
dvonbeck
2016/06/16 23:21:56
Done.
|
| canvas->drawRect(r, paint); |
| } |