Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(937)

Unified Diff: src/effects/gradients/SkGradientShader.cpp

Issue 2100223003: Check PremulType during GrGradientEffect::onIsEqual (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkGradientShader.cpp
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp
index c64085c86aed3ad8b9b9d17179dcd2e5c6b43779..52fbe81daf454925cefdf472c07b04a5ee81efb9 100644
--- a/src/effects/gradients/SkGradientShader.cpp
+++ b/src/effects/gradients/SkGradientShader.cpp
@@ -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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698