Index: src/core/SkBlitter_ARGB32.cpp |
diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp |
index f2de82a2e9e2ea8cc2748a9a7ea851437771d03b..96280b7baa6f60baccbfecf368eaa693a2c30b98 100644 |
--- a/src/core/SkBlitter_ARGB32.cpp |
+++ b/src/core/SkBlitter_ARGB32.cpp |
@@ -52,6 +52,7 @@ |
fSrcB = SkAlphaMul(SkColorGetB(color), scale); |
fPMColor = SkPackARGB32(fSrcA, fSrcR, fSrcG, fSrcB); |
+ fColor32Proc = SkBlitRow::ColorProcFactory(); |
} |
const SkBitmap* SkARGB32_Blitter::justAnOpaqueColor(uint32_t* value) { |
@@ -71,7 +72,7 @@ |
SkASSERT(x >= 0 && y >= 0 && x + width <= fDevice.width()); |
uint32_t* device = fDevice.getAddr32(x, y); |
- SkBlitRow::Color32(device, device, width, fPMColor); |
+ fColor32Proc(device, device, width, fPMColor); |
} |
void SkARGB32_Blitter::blitAntiH(int x, int y, const SkAlpha antialias[], |
@@ -96,7 +97,7 @@ |
sk_memset32(device, color, count); |
} else { |
uint32_t sc = SkAlphaMulQ(color, SkAlpha255To256(aa)); |
- SkBlitRow::Color32(device, device, count, sc); |
+ fColor32Proc(device, device, count, sc); |
} |
} |
runs += count; |
@@ -108,7 +109,7 @@ |
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); |
} |
@@ -116,7 +117,7 @@ |
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); |
@@ -247,7 +248,7 @@ |
size_t rowBytes = fDevice.rowBytes(); |
while (--height >= 0) { |
- SkBlitRow::Color32(device, device, width, color); |
+ fColor32Proc(device, device, width, color); |
device = (uint32_t*)((char*)device + rowBytes); |
} |
} |
@@ -300,7 +301,7 @@ |
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); |