Index: src/core/SkBlitter_ARGB32.cpp |
diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp |
index af62f2eb1d8c8d1d0807b04e36eabf6892ebc2d6..e4f8178b67a1bc46a416c0638e8b6a5bc8f3121e 100644 |
--- a/src/core/SkBlitter_ARGB32.cpp |
+++ b/src/core/SkBlitter_ARGB32.cpp |
@@ -170,14 +170,16 @@ void SkARGB32_Blitter::blitMask(const SkMask& mask, const SkIRect& clip) { |
return; |
} |
- if (SkBlitMask::BlitColor(fDevice, mask, clip, fColor)) { |
- return; |
- } |
- |
- if (mask.fFormat == SkMask::kBW_Format) { |
- SkARGB32_BlendBW(fDevice, mask, clip, fPMColor, SkAlpha255To256(255 - fSrcA)); |
- } else if (SkMask::kARGB32_Format == mask.fFormat) { |
- SkARGB32_Blit32(fDevice, mask, clip, fPMColor); |
+ switch (mask.fFormat) { |
+ case SkMask::kBW_Format: |
+ SkARGB32_BlendBW(fDevice, mask, clip, fPMColor, SkAlpha255To256(255 - fSrcA)); |
+ break; |
+ case SkMask::kARGB32_Format: |
+ SkARGB32_Blit32(fDevice, mask, clip, fPMColor); |
+ break; |
+ default: |
+ // If this asserts then the mask case was not handled. |
+ SkAssertResult(SkBlitMask::BlitColor(fDevice, mask, clip, fColor)); |
} |
} |
@@ -185,14 +187,16 @@ void SkARGB32_Opaque_Blitter::blitMask(const SkMask& mask, |
const SkIRect& clip) { |
SkASSERT(mask.fBounds.contains(clip)); |
- if (SkBlitMask::BlitColor(fDevice, mask, clip, fColor)) { |
- return; |
- } |
- |
- if (mask.fFormat == SkMask::kBW_Format) { |
- SkARGB32_BlitBW(fDevice, mask, clip, fPMColor); |
- } else if (SkMask::kARGB32_Format == mask.fFormat) { |
- SkARGB32_Blit32(fDevice, mask, clip, fPMColor); |
+ switch (mask.fFormat) { |
+ case SkMask::kBW_Format: |
+ SkARGB32_BlitBW(fDevice, mask, clip, fPMColor); |
+ break; |
+ case SkMask::kARGB32_Format: |
+ SkARGB32_Blit32(fDevice, mask, clip, fPMColor); |
+ break; |
+ default: |
+ // If this asserts then the mask case was not handled. |
+ SkAssertResult(SkBlitMask::BlitColor(fDevice, mask, clip, fColor)); |
reed1
2016/06/13 11:03:14
My read is the BlitColor was written as a chance f
herb_g
2016/06/22 17:54:53
Fixed.
I had assumed that the BlitColor call and t
|
} |
} |