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

Unified Diff: samplecode/SampleShadowing.cpp

Issue 2285133002: Optimizations and more documentation of SkShadowShader (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: made req changes 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 | « no previous file | src/core/SkShadowShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleShadowing.cpp
diff --git a/samplecode/SampleShadowing.cpp b/samplecode/SampleShadowing.cpp
index 4892f9c27df5c97eb27bd38175a2f59ac5082aac..5715e1a6052f528f118015a131372dcf90cd00a8 100644
--- a/samplecode/SampleShadowing.cpp
+++ b/samplecode/SampleShadowing.cpp
@@ -22,7 +22,7 @@ public:
, fClearShadowMaps(false)
, fSelectedRectID(-1)
, fSelectedSliderID(-1)
- , fLightDepth(300.0f) {
+ , fLightDepth(600.0f) {
this->setBGColor(0xFFCCCCCC);
this->updateLights(200, 200);
@@ -80,6 +80,7 @@ protected:
case 'q':
fLightDepth += 5.0f;
fMoveLight = true;
+ break;
case 'B':
if (SkShadowParams::kVariance_ShadowType == fShadowParams.fType) {
fShadowParams.fType = SkShadowParams::kNoBlur_ShadowType;
@@ -165,12 +166,12 @@ protected:
SkVector3::Make(x - 50,
350 - y,
fLightDepth),
- 1024));
+ 100000));
builder.add(SkLights::Light::MakePoint(SkColor3f::Make(0.6f, 0.4f, 0.2f),
SkVector3::Make(x + 50,
450 - y,
fLightDepth),
- 1024));
+ 100000));
builder.add(SkLights::Light::MakeDirectional(SkColor3f::Make(0.2f, 0.2f, 0.2f),
SkVector3::Make(0.2f, 0.2f, 1.0f)));
fLights = builder.finish();
« no previous file with comments | « no previous file | src/core/SkShadowShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698