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

Unified Diff: src/core/SkBlitter_Sprite.cpp

Issue 2036493004: Add gm for displaying different variants of 8888. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Sync pdf Created 4 years, 6 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 | « gm/all_bitmap_configs.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)) {
« no previous file with comments | « gm/all_bitmap_configs.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698