aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/effects/gradients/SkTwoPointConicalGradient.cpp6
-rw-r--r--src/effects/gradients/SkTwoPointConicalGradient.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index d3fb4dd435..38aa60cf7f 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -190,6 +190,12 @@ SkTwoPointConicalGradient::SkTwoPointConicalGradient(
this->init();
}
+bool SkTwoPointConicalGradient::isOpaque() const {
+ // Because areas outside the cone are left untouched, we cannot treat the
+ // shader as opaque even if the gradient itself is opaque.
+ return false;
+}
+
void SkTwoPointConicalGradient::shadeSpan(int x, int y, SkPMColor* dstCParam,
int count) {
int toggle = init_dither_toggle(x, y);
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.h b/src/effects/gradients/SkTwoPointConicalGradient.h
index e02c390ab4..0807ae3201 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.h
+++ b/src/effects/gradients/SkTwoPointConicalGradient.h
@@ -62,6 +62,7 @@ public:
TileMode* xy) const;
virtual SkShader::GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint& paint) const SK_OVERRIDE;
+ virtual bool isOpaque() const SK_OVERRIDE;
SkScalar getCenterX1() const { return SkPoint::Distance(fCenter1, fCenter2); }
SkScalar getStartRadius() const { return fRadius1; }