diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-22 22:35:24 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-22 22:35:24 +0000 |
commit | 39123f4c0b4a02b7d94bac4f0348d6ec468b4382 (patch) | |
tree | 130936a015845148a4299c7a86f11e54d0c3eccb | |
parent | ca96902077b073a5b5e7a0759ceaf81d5bf7c4f5 (diff) |
temporarily add back in the factores that took a unitmapper
BUG=skia:
R=fmalita@google.com, fmalita@chromium.org, reed@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/292513006
git-svn-id: http://skia.googlecode.com/svn/trunk@14859 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | include/effects/SkGradientShader.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/include/effects/SkGradientShader.h b/include/effects/SkGradientShader.h index a5b4f29b76..cf5cac8d58 100644 --- a/include/effects/SkGradientShader.h +++ b/include/effects/SkGradientShader.h @@ -10,6 +10,8 @@ #include "SkShader.h" +#define SK_SUPPORT_LEGACY_GRADIENT_FACTORIES + /** \class SkGradientShader SkGradientShader hosts factories for creating subclasses of SkShader that @@ -53,6 +55,15 @@ public: return CreateLinear(pts, colors, pos, count, mode, 0, NULL); } +#ifdef SK_SUPPORT_LEGACY_GRADIENT_FACTORIES + static SkShader* CreateLinear(const SkPoint pts[2], + const SkColor colors[], const SkScalar pos[], int count, + SkShader::TileMode mode, void* ignored, + uint32_t flags, const SkMatrix* localMatrix) { + return CreateLinear(pts, colors, pos, count, mode, flags, localMatrix); + } +#endif + /** Returns a shader that generates a radial gradient given the center and radius. <p /> CreateRadial returns a shader with a reference count of 1. @@ -80,6 +91,15 @@ public: return CreateRadial(center, radius, colors, pos, count, mode, 0, NULL); } +#ifdef SK_SUPPORT_LEGACY_GRADIENT_FACTORIES + static SkShader* CreateRadial(const SkPoint& center, SkScalar radius, + const SkColor colors[], const SkScalar pos[], int count, + SkShader::TileMode mode, void* ignored, + uint32_t flags, const SkMatrix* localMatrix) { + return CreateRadial(center, radius, colors, pos, count, mode, flags, localMatrix); + } +#endif + /** Returns a shader that generates a radial gradient given the start position, start radius, end position and end radius. <p /> CreateTwoPointRadial returns a shader with a reference count of 1. @@ -113,6 +133,17 @@ public: 0, NULL); } +#ifdef SK_SUPPORT_LEGACY_GRADIENT_FACTORIES + static SkShader* CreateTwoPointRadial(const SkPoint& start, SkScalar startRadius, + const SkPoint& end, SkScalar endRadius, + const SkColor colors[], const SkScalar pos[], int count, + SkShader::TileMode mode, void* ignored, + uint32_t flags, const SkMatrix* localMatrix) { + return CreateTwoPointRadial(start, startRadius, end, endRadius, colors, pos, count, mode, + flags, localMatrix); + } +#endif + /** * Returns a shader that generates a conical gradient given two circles, or * returns NULL if the inputs are invalid. The gradient interprets the @@ -133,6 +164,17 @@ public: 0, NULL); } +#ifdef SK_SUPPORT_LEGACY_GRADIENT_FACTORIES + static SkShader* CreateTwoPointConical(const SkPoint& start, SkScalar startRadius, + const SkPoint& end, SkScalar endRadius, + const SkColor colors[], const SkScalar pos[], int count, + SkShader::TileMode mode, void* ignored, + uint32_t flags, const SkMatrix* localMatrix) { + return CreateTwoPointConical(start, startRadius, end, endRadius, colors, pos, count, mode, + flags, localMatrix); + } +#endif + /** Returns a shader that generates a sweep gradient given a center. <p /> CreateSweep returns a shader with a reference count of 1. @@ -157,6 +199,15 @@ public: return CreateSweep(cx, cy, colors, pos, count, 0, NULL); } +#ifdef SK_SUPPORT_LEGACY_GRADIENT_FACTORIES + static SkShader* CreateSweep(SkScalar cx, SkScalar cy, + const SkColor colors[], const SkScalar pos[], int count, + void* ignored, + uint32_t flags, const SkMatrix* localMatrix) { + return CreateSweep(cx, cy, colors, pos, count, flags, localMatrix); + } +#endif + SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() }; |