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