Index: src/core/SkBlitter_Sprite.cpp |
diff --git a/src/core/SkBlitter_Sprite.cpp b/src/core/SkBlitter_Sprite.cpp |
index 2ddc5f4855594cac173ac45747850d57273ef8e3..dc912b0f65a6b00942ff36678a0b7a5755b2e507 100644 |
--- a/src/core/SkBlitter_Sprite.cpp |
+++ b/src/core/SkBlitter_Sprite.cpp |
@@ -149,6 +149,12 @@ SkBlitter* SkBlitter::ChooseSprite(const SkPixmap& dst, const SkPaint& paint, |
*/ |
SkASSERT(allocator != nullptr); |
+ // Defer to the general code if the pixels are unpremultipled. This case is not common, |
+ // and this simplifies the code. |
+ if (source.alphaType() == kUnpremul_SkAlphaType) { |
+ return nullptr; |
+ } |
+ |
SkSpriteBlitter* blitter = nullptr; |
if (SkSpriteBlitter_Src_SrcOver::Supports(dst, source, paint)) { |