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

Unified Diff: src/effects/SkColorFilters.cpp

Issue 1026313002: Revert of correct reporting of kAlphaUnchanged_Flag in ModeFilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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/SkColorFilters.cpp
diff --git a/src/effects/SkColorFilters.cpp b/src/effects/SkColorFilters.cpp
index d4723ec18f6057623110a4e0a568f2da1e3398e7..8bcd0ebc5d67d96acf3d94149a744e30fd23f292 100644
--- a/src/effects/SkColorFilters.cpp
+++ b/src/effects/SkColorFilters.cpp
@@ -27,18 +27,7 @@
}
uint32_t SkModeColorFilter::getFlags() const {
- uint32_t flags = 0;
- switch (fMode) {
- case SkXfermode::kDst_Mode: //!< [Da, Dc]
- case SkXfermode::kSrcATop_Mode: //!< [Da, Sc * Da + (1 - Sa) * Dc]
- flags |= kAlphaUnchanged_Flag;
- default:
- break;
- }
- if (fProc16) {
- flags |= kHasFilter16_Flag;
- }
- return flags;
+ return fProc16 ? (kAlphaUnchanged_Flag | kHasFilter16_Flag) : 0;
}
void SkModeColorFilter::filterSpan(const SkPMColor shader[], int count, SkPMColor result[]) const {
@@ -401,7 +390,7 @@
uint32_t getFlags() const SK_OVERRIDE {
if (SkGetPackedA32(this->getPMColor()) == 0xFF) {
- return kHasFilter16_Flag;
+ return kAlphaUnchanged_Flag | kHasFilter16_Flag;
} else {
return 0;
}
@@ -431,7 +420,7 @@
uint32_t getFlags() const SK_OVERRIDE {
if (SkGetPackedA32(this->getPMColor()) == 0xFF) {
- return kHasFilter16_Flag;
+ return kAlphaUnchanged_Flag | kHasFilter16_Flag;
} else {
return 0;
}
« 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