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 2291663002: Revert of 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
« no previous file with comments | « gm/lightingshader.cpp ('k') | gm/lightingshaderbevel.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/lightingshader2.cpp
diff --git a/gm/lightingshader2.cpp b/gm/lightingshader2.cpp
index 886c647ff76bba07ad87542ed5dc1f7f2e902093..5afe2558b906b9594698699677772b33f9631bfb 100644
--- a/gm/lightingshader2.cpp
+++ b/gm/lightingshader2.cpp
@@ -47,12 +47,12 @@
SkLights::Builder builder;
builder.add(SkLights::Light::MakeDirectional(SkColor3f::Make(1.0f, 1.0f, 1.0f),
kLightFromUpperRight));
- builder.setAmbientLightColor(SkColor3f::Make(0.2f, 0.2f, 0.2f));
+ builder.add(SkLights::Light::MakeAmbient(SkColor3f::Make(0.2f, 0.2f, 0.2f)));
fLights = builder.finish();
// No directional lights
SkLights::Builder builderNoDir;
- builderNoDir.setAmbientLightColor(SkColor3f::Make(0.2f, 0.2f, 0.2f));
+ builderNoDir.add(SkLights::Light::MakeAmbient(SkColor3f::Make(0.2f, 0.2f, 0.2f)));
fLightsNoDir = builderNoDir.finish();
// Two directional lights
@@ -61,7 +61,7 @@
kLightFromUpperRight));
builderTwoDir.add(SkLights::Light::MakeDirectional(SkColor3f::Make(0.0f, 1.0f, 1.0f),
kLightFromUpperLeft));
- builderTwoDir.setAmbientLightColor(SkColor3f::Make(0.2f, 0.2f, 0.2f));
+ builderTwoDir.add(SkLights::Light::MakeAmbient(SkColor3f::Make(0.2f, 0.2f, 0.2f)));
fLightsTwoDir = builderTwoDir.finish();
fRect = SkRect::MakeIWH(kTexSize, kTexSize);
« no previous file with comments | « gm/lightingshader.cpp ('k') | gm/lightingshaderbevel.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698