diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /gfx/skia/skia/include/private/SkShadowParams.h | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'gfx/skia/skia/include/private/SkShadowParams.h')
-rw-r--r-- | gfx/skia/skia/include/private/SkShadowParams.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/gfx/skia/skia/include/private/SkShadowParams.h b/gfx/skia/skia/include/private/SkShadowParams.h new file mode 100644 index 000000000..3df0a4427 --- /dev/null +++ b/gfx/skia/skia/include/private/SkShadowParams.h @@ -0,0 +1,48 @@ +/* + * Copyright 2016 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ +#ifndef SkShadowParams_DEFINED +#define SkShadowParams_DEFINED + +/** \struct SkShadowParams + + This struct holds information needed for drawing shadows. + + fShadowRadius - radius of the shadow blur + + fBiasingConstant - A constant used in variance shadow mapping to directly + 0.0 - 1.0 reduce light bleeding. Essentially sets all shadows + ~.25 below a certain brightness equal to no light, and does + a linear step on the rest. Essentially makes shadows + darker and more rounded at higher values. + + fMinVariance - Too low of a variance (near the outer edges of blurry + ~512, 1024 shadows) will lead to ugly sharp shadow brightness + distortions. This enforces a minimum amount of variance + in the calculation to smooth out the outside edges of + blurry shadows. However, too high of a value for this will + cause all shadows to be lighter by visibly different + amounts varying on depth. + + fType - Decides which algorithm to use to draw shadows. +*/ +struct SkShadowParams { + SkScalar fShadowRadius; + SkScalar fBiasingConstant; + SkScalar fMinVariance; + + enum ShadowType { + kNoBlur_ShadowType, + kVariance_ShadowType, + + kLast_ShadowType = kVariance_ShadowType + }; + static const int kShadowTypeCount = kLast_ShadowType + 1; + + ShadowType fType; +}; + +#endif |