Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: gm/lightingshader.cpp

Issue 2063793002: API change to allow for NormalSource selection at the user level. (Closed) Base URL: https://skia.googlesource.com/skia@dvonbeck-normal-factor-out
Patch Set: Small rebase and comment fix Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | samplecode/SampleLighting.cpp » ('j') | samplecode/SampleLighting.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | samplecode/SampleLighting.cpp » ('j') | samplecode/SampleLighting.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698