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

Unified Diff: src/core/SkShadowShader.cpp

Issue 2237493002: Added PointLights to SkLights::Light (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: changed a vec3 to a point3 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
« src/core/SkLightingShader.cpp ('K') | « src/core/SkLightingShader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkShadowShader.cpp
diff --git a/src/core/SkShadowShader.cpp b/src/core/SkShadowShader.cpp
index 5fc992acc14dd790ab86e43e6a761ecc7b7db8bc..0850ace7fd0d3eba3308501cfc551d78b004e7d8 100644
--- a/src/core/SkShadowShader.cpp
+++ b/src/core/SkShadowShader.cpp
@@ -605,7 +605,7 @@ sk_sp<SkFlattenable> SkShadowShaderImpl::CreateProc(SkReadBuffer& buf) {
}
robertphillips 2016/08/10 17:48:39 What about serialization of point lights here ?
vjiaoblack 2016/08/11 14:27:23 Done.
if (isAmbient) {
- builder.add(SkLights::Light(color));
+ builder.add(SkLights::Light::MakeAmbient(color));
} else {
SkVector3 dir;
if (!buf.readScalarArray(&dir.fX, 3)) {
@@ -617,7 +617,7 @@ sk_sp<SkFlattenable> SkShadowShaderImpl::CreateProc(SkReadBuffer& buf) {
return nullptr;
}
- SkLights::Light light = SkLights::Light(color, dir);
+ SkLights::Light light = SkLights::Light::MakeDirectional(color, dir);
light.setShadowMap(depthMap);
builder.add(light);
« src/core/SkLightingShader.cpp ('K') | « src/core/SkLightingShader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698