Check PremulType during GrGradientEffect::onIsEqual

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2100223003

Review-Url: https://codereview.chromium.org/2100223003
This commit is contained in:
csmartdalton 2016-06-27 14:02:10 -07:00 committed by Commit bot
parent 4583ec51d9
commit 523a239e53

View 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;