diff options
author | Brian Salomon <bsalomon@google.com> | 2017-07-27 15:45:59 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-27 20:06:33 +0000 |
commit | f8480b90551d29484d51e74f6a43c9ab95b5d95c (patch) | |
tree | 10d594d4829adbf82d45ef5fb51d25faacf3e51e /src/shaders/gradients/SkGradientShaderPriv.h | |
parent | 2e2d34b61296c034894749659a53fd4b41f0a3cc (diff) |
Implement clone() for Gradient GrFragmentProcessors
Also removes the hard stop gradient conditional compilation macro.
Change-Id: Idd56b5f3061db063d650a0090406ec192acc0b53
Reviewed-on: https://skia-review.googlesource.com/27661
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/shaders/gradients/SkGradientShaderPriv.h')
-rw-r--r-- | src/shaders/gradients/SkGradientShaderPriv.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/shaders/gradients/SkGradientShaderPriv.h b/src/shaders/gradients/SkGradientShaderPriv.h index 47ef70c5b0..07ba7e3521 100644 --- a/src/shaders/gradients/SkGradientShaderPriv.h +++ b/src/shaders/gradients/SkGradientShaderPriv.h @@ -24,10 +24,6 @@ #include "SkUtils.h" #include "SkWriteBuffer.h" -#if SK_SUPPORT_GPU - #define GR_GL_USE_ACCURATE_HARD_STOP_GRADIENTS 1 -#endif - static inline void sk_memset32_dither(uint32_t dst[], uint32_t v0, uint32_t v1, int count) { if (count > 0) { @@ -374,12 +370,9 @@ public: kTwo_ColorType, kThree_ColorType, // Symmetric three color kTexture_ColorType, - -#if GR_GL_USE_ACCURATE_HARD_STOP_GRADIENTS kSingleHardStop_ColorType, // 0, t, t, 1 kHardStopLeftEdged_ColorType, // 0, 0, 1 kHardStopRightEdged_ColorType, // 0, 1, 1 -#endif }; ColorType getColorType() const { return fColorType; } @@ -414,6 +407,7 @@ public: protected: GrGradientEffect(const CreateArgs&, bool isOpaque); + explicit GrGradientEffect(const GrGradientEffect&); // facilitates clone() implementations #if GR_TEST_UTILS /** Helper struct that stores (and populates) parameters to construct a random gradient. @@ -519,7 +513,7 @@ private: // hard stop cases (neither means using texture atlas) kTwoColorKey = 2, kThreeColorKey = 4, -#if GR_GL_USE_ACCURATE_HARD_STOP_GRADIENTS + kHardStopCenteredKey = 6, kHardStopZeroZeroOneKey = 8, kHardStopZeroOneOneKey = 10, @@ -531,7 +525,6 @@ private: // Lower six bits for premul, 2/3 color type, and tile mode kReservedBits = 6, -#endif }; SkScalar fCachedYCoord; |