From 5823846397066377b65e011a42becd2d665110ad Mon Sep 17 00:00:00 2001 From: herb Date: Fri, 3 Jun 2016 09:44:53 -0700 Subject: Add gm for displaying different variants of 8888 bitmaps and fix a small rejection case for sprite blitters. BUG=skia:5378 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2036493004 Review-Url: https://codereview.chromium.org/2036493004 --- src/core/SkBlitter_Sprite.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/core/SkBlitter_Sprite.cpp b/src/core/SkBlitter_Sprite.cpp index 2ddc5f4855..dc912b0f65 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)) { -- cgit v1.2.3