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

Unified Diff: gm/lightingshader2.cpp

Issue 2237493002: Added PointLights to SkLights::Light (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: gm/lightingshader2.cpp
diff --git a/gm/lightingshader2.cpp b/gm/lightingshader2.cpp
index 5e0d19b661237784ca7258df78e467094cacb19d..1e7e706ce6069c1e6ae5338c3d2e26f2ea4e63b6 100644
--- a/gm/lightingshader2.cpp
+++ b/gm/lightingshader2.cpp
@@ -43,9 +43,9 @@ protected:
SkLights::Builder builder;
const SkVector3 kLightFromUpperRight = SkVector3::Make(0.788f, 0.394f, 0.473f);
- builder.add(SkLights::Light(SkColor3f::Make(1.0f, 1.0f, 1.0f),
- kLightFromUpperRight));
- builder.add(SkLights::Light(SkColor3f::Make(0.2f, 0.2f, 0.2f)));
+ builder.add(SkLights::Light::MakeDirectionalLight(SkColor3f::Make(1.0f, 1.0f, 1.0f),
+ kLightFromUpperRight));
+ builder.add(SkLights::Light::MakeAmbientLight(SkColor3f::Make(0.2f, 0.2f, 0.2f)));
fLights = builder.finish();
fRect = SkRect::MakeIWH(kTexSize, kTexSize);

Powered by Google App Engine
This is Rietveld 408576698