diff options
author | vjiaoblack <vjiaoblack@google.com> | 2016-08-29 08:38:04 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-29 08:38:04 -0700 |
commit | 84cddf6fa7a2ee4a8163f99c9238d5fba6b49566 (patch) | |
tree | e14502025540f7fdcf2c3678bde5cdd6ea2de588 /samplecode | |
parent | b398ecc2a41684bd33138a920b446e987b2b30d0 (diff) |
Revert of Moved ambient lights out of SkLight's light array (patchset #7 id:120001 of https://codereview.chromium.org/2287553002/ )
Reason for revert:
Made Deigo's GM miss their ambient lights
Original issue's description:
> Moved ambient lights out of SkLight's light array
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2287553002
>
> Committed: https://skia.googlesource.com/skia/+/8f98f0aa2d3f7571a890b916c7c4b5ee831e9686
TBR=robertphillips@google.com,djsollen@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review-Url: https://codereview.chromium.org/2291663002
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/SampleBevel.cpp | 2 | ||||
-rwxr-xr-x | samplecode/SampleLighting.cpp | 2 | ||||
-rw-r--r-- | samplecode/SampleLitAtlas.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/samplecode/SampleBevel.cpp b/samplecode/SampleBevel.cpp index cbeb2499a5..e592cf191a 100644 --- a/samplecode/SampleBevel.cpp +++ b/samplecode/SampleBevel.cpp @@ -749,7 +749,7 @@ protected: fLightDefs[i].fDirXY.fY, fLightDefs[i].fDirZ))); } - builder.setAmbientLightColor(SkColor3f::Make(0.4f, 0.4f, 0.4f)); + builder.add(SkLights::Light::MakeAmbient(SkColor3f::Make(0.4f, 0.4f, 0.4f))); fLights = builder.finish(); // Draw shapes diff --git a/samplecode/SampleLighting.cpp b/samplecode/SampleLighting.cpp index 2218f31022..bab2b5df92 100755 --- a/samplecode/SampleLighting.cpp +++ b/samplecode/SampleLighting.cpp @@ -22,7 +22,7 @@ static sk_sp<SkLights> create_lights(SkScalar angle, SkScalar blue) { SkLights::Builder builder; builder.add(SkLights::Light::MakeDirectional(SkColor3f::Make(1.0f, 1.0f, blue), dir)); - builder.setAmbientLightColor(SkColor3f::Make(0.1f, 0.1f, 0.1f)); + builder.add(SkLights::Light::MakeAmbient(SkColor3f::Make(0.1f, 0.1f, 0.1f))); return builder.finish(); } diff --git a/samplecode/SampleLitAtlas.cpp b/samplecode/SampleLitAtlas.cpp index 149da98a02..cb49bf3872 100644 --- a/samplecode/SampleLitAtlas.cpp +++ b/samplecode/SampleLitAtlas.cpp @@ -184,7 +184,7 @@ private: builder.add(SkLights::Light::MakeDirectional( SkColor3f::Make(1.0f, 1.0f, 1.0f), fLightDir)); - 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(); } |