Index: src/effects/gradients/SkSweepGradient.cpp |
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp |
index 1e6b642260c1799e2f3e1cd03901de48ffbde25e..51433afbca351eba0ecabb7bb2f29698ae41cf53 100644 |
--- a/src/effects/gradients/SkSweepGradient.cpp |
+++ b/src/effects/gradients/SkSweepGradient.cpp |
@@ -8,12 +8,15 @@ |
#include "SkSweepGradient.h" |
-SkSweepGradient::SkSweepGradient(SkScalar cx, SkScalar cy, const SkColor colors[], |
- const SkScalar pos[], int count, SkUnitMapper* mapper) |
-: SkGradientShaderBase(colors, pos, count, SkShader::kClamp_TileMode, mapper), |
+SkSweepGradient::SkSweepGradient(SkScalar cx, SkScalar cy, |
+ const Descriptor& desc) |
+: SkGradientShaderBase(desc), |
fCenter(SkPoint::Make(cx, cy)) |
{ |
fPtsToUnit.setTranslate(-cx, -cy); |
+ |
+ // overwrite the tilemode to a canonical value (since sweep ignores it) |
+ fTileMode = SkShader::kClamp_TileMode; |
} |
SkShader::BitmapType SkSweepGradient::asABitmap(SkBitmap* bitmap, |