Index: src/core/SkBlitter_ARGB32.cpp |
diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp |
index bbad6c792664dc0d51e23e4570aa27eef84f19e9..caf85ddc1fec65b2cbeb64ea1968f6ca90f0471d 100644 |
--- a/src/core/SkBlitter_ARGB32.cpp |
+++ b/src/core/SkBlitter_ARGB32.cpp |
@@ -106,6 +106,25 @@ void SkARGB32_Blitter::blitAntiH(int x, int y, const SkAlpha antialias[], |
} |
} |
+#ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2 |
+void SkARGB32_Blitter::blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) { |
+ uint32_t* device = fDevice.getAddr32(x, y); |
+ SkDEBUGCODE((void)fDevice.getAddr32(x + 1, y);) |
+ |
+ device[0] = SkBlendARGB32(fPMColor, device[0], a0); |
+ device[1] = SkBlendARGB32(fPMColor, device[1], a1); |
+} |
+ |
+void SkARGB32_Blitter::blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) { |
+ uint32_t* device = fDevice.getAddr32(x, y); |
+ SkDEBUGCODE((void)fDevice.getAddr32(x, y + 1);) |
+ |
+ device[0] = SkBlendARGB32(fPMColor, device[0], a0); |
+ device = (uint32_t*)((char*)device + fDevice.rowBytes()); |
+ device[0] = SkBlendARGB32(fPMColor, device[0], a1); |
+} |
+#endif |
+ |
////////////////////////////////////////////////////////////////////////////////////// |
#define solid_8_pixels(mask, dst, color) \ |
@@ -180,6 +199,25 @@ void SkARGB32_Opaque_Blitter::blitMask(const SkMask& mask, |
} |
} |
+#ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2 |
+void SkARGB32_Opaque_Blitter::blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) { |
+ uint32_t* device = fDevice.getAddr32(x, y); |
+ SkDEBUGCODE((void)fDevice.getAddr32(x + 1, y);) |
+ |
+ device[0] = SkFastFourByteInterp(fPMColor, device[0], a0); |
+ device[1] = SkFastFourByteInterp(fPMColor, device[1], a1); |
+} |
+ |
+void SkARGB32_Opaque_Blitter::blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) { |
+ uint32_t* device = fDevice.getAddr32(x, y); |
+ SkDEBUGCODE((void)fDevice.getAddr32(x, y + 1);) |
+ |
+ device[0] = SkFastFourByteInterp(fPMColor, device[0], a0); |
+ device = (uint32_t*)((char*)device + fDevice.rowBytes()); |
+ device[0] = SkFastFourByteInterp(fPMColor, device[0], a1); |
+} |
+#endif |
+ |
/////////////////////////////////////////////////////////////////////////////// |
void SkARGB32_Blitter::blitV(int x, int y, int height, SkAlpha alpha) { |
@@ -256,6 +294,25 @@ void SkARGB32_Black_Blitter::blitAntiH(int x, int y, const SkAlpha antialias[], |
} |
} |
+#ifndef SK_SUPPORT_LEGACY_BLITANTIH2V2 |
+void SkARGB32_Black_Blitter::blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) { |
+ uint32_t* device = fDevice.getAddr32(x, y); |
+ SkDEBUGCODE((void)fDevice.getAddr32(x + 1, y);) |
+ |
+ device[0] = (a0 << SK_A32_SHIFT) + SkAlphaMulQ(device[0], 256 - a0); |
+ device[1] = (a1 << SK_A32_SHIFT) + SkAlphaMulQ(device[1], 256 - a1); |
+} |
+ |
+void SkARGB32_Black_Blitter::blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) { |
+ uint32_t* device = fDevice.getAddr32(x, y); |
+ SkDEBUGCODE((void)fDevice.getAddr32(x, y + 1);) |
+ |
+ device[0] = (a0 << SK_A32_SHIFT) + SkAlphaMulQ(device[0], 256 - a0); |
+ device = (uint32_t*)((char*)device + fDevice.rowBytes()); |
+ device[0] = (a1 << SK_A32_SHIFT) + SkAlphaMulQ(device[0], 256 - a1); |
+} |
+#endif |
+ |
/////////////////////////////////////////////////////////////////////////////// |
// Special version of SkBlitRow::Factory32 that knows we're in kSrc_Mode, |