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

Unified Diff: samplecode/SampleShadowing.cpp

Issue 2287553002: Moved ambient lights out of SkLight's light array (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 4 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
Index: samplecode/SampleShadowing.cpp
diff --git a/samplecode/SampleShadowing.cpp b/samplecode/SampleShadowing.cpp
index e27b4cff328d1a1b0059d5c3e610849c56f8bdd7..12ed3f6da3bf1a06b5a29762c25604e60a3da59e 100644
--- a/samplecode/SampleShadowing.cpp
+++ b/samplecode/SampleShadowing.cpp
@@ -23,7 +23,7 @@ public:
SkVector3::Make(0.2f, 0.05f, 1.0f)));
builder.add(SkLights::Light::MakeDirectional(SkColor3f::Make(0.4f, 0.3f, 0.2f),
SkVector3::Make(0.05f, 0.2f, 1.0f)));
- builder.add(SkLights::Light::MakeAmbient(SkColor3f::Make(0.4f, 0.4f, 0.4f)));
+ builder.setAmbientLightColor(SkColor3f::Make(0.4f, 0.4f, 0.4f));
fLights = builder.finish();
fTestRects[0].fColor = 0xFFEE8888;
@@ -203,8 +203,7 @@ protected:
SkVector3::Make(0.05f + (200.0f - x) * recipX,
0.2f + (200.0f - y) * recipY,
1.0f)));
- builder.add(SkLights::Light::MakeAmbient(
- SkColor3f::Make(0.4f, 0.4f, 0.4f)));
+ builder.setAmbientLightColor(SkColor3f::Make(0.4f, 0.4f, 0.4f));
fLights = builder.finish();
fLightsChanged = true;

Powered by Google App Engine
This is Rietveld 408576698