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

Unified Diff: gm/lightingshaderbevel.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/lightingshaderbevel.cpp
diff --git a/gm/lightingshaderbevel.cpp b/gm/lightingshaderbevel.cpp
index dfc46e44717b784b8843d770d7be1354be0d0cb5..cdba7a5b7e534183bf34ac9cb38de9946cc315b8 100644
--- a/gm/lightingshaderbevel.cpp
+++ b/gm/lightingshaderbevel.cpp
@@ -36,9 +36,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 is assumed to be square throughout this file

Powered by Google App Engine
This is Rietveld 408576698