Check PremulType during GrGradientEffect::onIsEqual
authorcsmartdalton <csmartdalton@google.com>
Mon, 27 Jun 2016 21:02:10 +0000 (14:02 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 27 Jun 2016 21:02:10 +0000 (14:02 -0700)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2100223003

Review-Url: https://codereview.chromium.org/2100223003

src/effects/gradients/SkGradientShader.cpp

index c64085c86aed3ad8b9b9d17179dcd2e5c6b43779..52fbe81daf454925cefdf472c07b04a5ee81efb9 100644 (file)
@@ -1157,12 +1157,14 @@ bool GrGradientEffect::onIsEqual(const GrFragmentProcessor& processor) const {
     if (this->fColorType == s.getColorType()){
 
         if (SkGradientShaderBase::kTwo_GpuColorType == fColorType) {
-            if (*this->getColors(0) != *s.getColors(0) ||
+            if (this->getPremulType() != s.getPremulType() ||
+                *this->getColors(0) != *s.getColors(0) ||
                 *this->getColors(1) != *s.getColors(1)) {
                 return false;
             }
         } else if (SkGradientShaderBase::kThree_GpuColorType == fColorType) {
-            if (*this->getColors(0) != *s.getColors(0) ||
+            if (this->getPremulType() != s.getPremulType() ||
+                *this->getColors(0) != *s.getColors(0) ||
                 *this->getColors(1) != *s.getColors(1) ||
                 *this->getColors(2) != *s.getColors(2)) {
                 return false;