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

Unified Diff: src/core/SkShadowShader.h

Issue 2224163005: Made shadows blurry (thru implementing variance mapping) (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
Index: src/core/SkShadowShader.h
diff --git a/src/core/SkShadowShader.h b/src/core/SkShadowShader.h
index 163d58acd7638f444d6937e4b2402634b91d50bd..75db0dd151b3f5a2cdcdb3cad3c254bf20886b5f 100644
--- a/src/core/SkShadowShader.h
+++ b/src/core/SkShadowShader.h
@@ -14,6 +14,18 @@
class SkLights;
class SkShader;
+struct SkShadowType {
+ SkScalar fShadowRadius;
+ SkScalar fBiasingConstant;
+ SkScalar fMinVariance;
+
+ enum BlurAlgorithm {
+ kNoBlur_BlurAlgorithm,
+ kVariance_BlurAlgorithm
+ };
+ BlurAlgorithm fBlurAlgorithm;
+};
+
class SK_API SkShadowShader {
public:
/** This shader combines the diffuse color in 'diffuseShader' with the shadows
@@ -23,7 +35,8 @@ public:
static sk_sp<SkShader> Make(sk_sp<SkShader> povDepthShader,
sk_sp<SkShader> diffuseShader,
sk_sp<SkLights> lights,
- int diffuseWidth, int diffuseHeight);
+ int diffuseWidth, int diffuseHeight,
+ SkShadowType sType);
// The shadow shader supports any number of ambient lights, but only
// 4 non-ambient lights (currently just refers to directional lights).

Powered by Google App Engine
This is Rietveld 408576698