aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/gradients/SkGradientShaderPriv.h
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2016-10-17 12:48:13 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-18 13:01:28 +0000
commita2196536782903d22011ed7145b8640c66fc72ff (patch)
tree065f25088074f908a3531acce43d1c3a26367863 /src/effects/gradients/SkGradientShaderPriv.h
parent8bf4e672f2c40ef313274f8b79c2c9304f9fff3f (diff)
Include 4f variants of random gradients during testing
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3538 Change-Id: Ieee6e49cb830b6aab87b0ecd7865c65ffb90dfe8 Reviewed-on: https://skia-review.googlesource.com/3538 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/effects/gradients/SkGradientShaderPriv.h')
-rw-r--r--src/effects/gradients/SkGradientShaderPriv.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h
index 36ccab04e1..cbffea1f2f 100644
--- a/src/effects/gradients/SkGradientShaderPriv.h
+++ b/src/effects/gradients/SkGradientShaderPriv.h
@@ -401,16 +401,20 @@ public:
protected:
/** Helper struct that stores (and populates) parameters to construct a random gradient.
- The constructor decides whether stop values should be used or not (fStops may be nullptr
- after construction). fColorCount will be the number of color stops, and fColors and fStops
- can be passed to the gradient factory.
- */
+ If fUseColors4f is true, then the SkColor4f factory should be called, with fColors4f and
+ fColorSpace. Otherwise, the SkColor factory should be called, with fColors. fColorCount
+ will be the number of color stops in either case, and fColors and fStops can be passed to
+ the gradient factory. (The constructor may decide not to use stops, in which case fStops
+ will be nullptr). */
struct RandomGradientParams {
static const int kMaxRandomGradientColors = 4;
RandomGradientParams(SkRandom* r);
+ bool fUseColors4f;
SkColor fColors[kMaxRandomGradientColors];
+ SkColor4f fColors4f[kMaxRandomGradientColors];
+ sk_sp<SkColorSpace> fColorSpace;
SkScalar fStopStorage[kMaxRandomGradientColors];
SkShader::TileMode fTileMode;
int fColorCount;