Index: src/effects/gradients/SkGradientShaderPriv.h |
diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h |
index b9dbf1b87b062c193c49d7ab696ea6533aec2a8b..2f41bebbcec3e787e1ec3ea8dbf7944481c64529 100644 |
--- a/src/effects/gradients/SkGradientShaderPriv.h |
+++ b/src/effects/gradients/SkGradientShaderPriv.h |
@@ -82,8 +82,21 @@ static const TileProc gTileProcs[] = { |
class SkGradientShaderBase : public SkShader { |
public: |
- SkGradientShaderBase(const SkColor colors[], const SkScalar pos[], |
- int colorCount, SkShader::TileMode mode, SkUnitMapper* mapper); |
+ struct Descriptor { |
+ Descriptor() { |
+ sk_bzero(this, sizeof(*this)); |
+ fTileMode = SkShader::kClamp_TileMode; |
+ } |
+ |
+ const SkColor* fColors; |
+ const SkScalar* fPos; |
+ int fCount; |
+ SkShader::TileMode fTileMode; |
+ SkUnitMapper* fMapper; |
+ }; |
+ |
+public: |
+ SkGradientShaderBase(const Descriptor& desc); |
virtual ~SkGradientShaderBase(); |
virtual bool setContext(const SkBitmap&, const SkPaint&, const SkMatrix&) SK_OVERRIDE; |