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

Unified Diff: src/core/SkBlitter_ARGB32.cpp

Issue 2054213002: Add documention on SkBlitter for runs, and small cleanups. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix broken dispatch code. 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 | « src/core/SkBlitter.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_ARGB32.cpp
diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp
index af62f2eb1d8c8d1d0807b04e36eabf6892ebc2d6..7adab5544537fd052897d4dfdcb3e4a6b20246b4 100644
--- a/src/core/SkBlitter_ARGB32.cpp
+++ b/src/core/SkBlitter_ARGB32.cpp
@@ -174,10 +174,15 @@ void SkARGB32_Blitter::blitMask(const SkMask& mask, const SkIRect& clip) {
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:
+ SkFAIL("Mask format not handled.");
}
}
@@ -189,10 +194,15 @@ void SkARGB32_Opaque_Blitter::blitMask(const SkMask& mask,
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:
+ SkFAIL("Mask format not handled.");
}
}
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698