aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-07-07 19:12:50 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-07-07 19:12:50 +0000
commite6ea606fb92cd611b965806cb005f87495b261f2 (patch)
tree913dc2168f4243a572cc06347fcd819214c8bc4a /src/core
parent5b69ddafa4d4f92b0bf107c50c636a9d77102511 (diff)
re-enable SSE2 blitmask procs, only excluding if we're black (in which case
the protable version is still faster) git-svn-id: http://skia.googlecode.com/svn/trunk@1819 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkBlitRow_D32.cpp1
-rw-r--r--src/core/SkBlitter_ARGB32.cpp25
2 files changed, 5 insertions, 21 deletions
diff --git a/src/core/SkBlitRow_D32.cpp b/src/core/SkBlitRow_D32.cpp
index 642fe7f8e0..72df59c75a 100644
--- a/src/core/SkBlitRow_D32.cpp
+++ b/src/core/SkBlitRow_D32.cpp
@@ -230,7 +230,6 @@ static void D32_Mask_Black(void* dst, size_t dstRB, SkBitmap::Config,
SkBlitMask::Proc SkBlitMask::Factory(SkBitmap::Config config, SkColor color) {
SkBlitMask::Proc proc = PlatformProcs(config, color);
- proc = NULL;
if (NULL == proc) {
switch (config) {
case SkBitmap::kARGB_8888_Config:
diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp
index f54bd5a274..073757ac0a 100644
--- a/src/core/SkBlitter_ARGB32.cpp
+++ b/src/core/SkBlitter_ARGB32.cpp
@@ -409,26 +409,11 @@ void SkARGB32_Black_Blitter::blitMask(const SkMask& mask, const SkIRect& clip) {
} else if (SkMask::kLCD32_Format == mask.fFormat) {
blitmask_lcd32(fDevice, mask, clip, fPMColor);
} else {
- unsigned width = clip.width();
- unsigned height = clip.height();
-
- SkASSERT((int)height > 0);
- SkASSERT((int)width > 0);
-
- uint32_t* device = fDevice.getAddr32(clip.fLeft, clip.fTop);
- unsigned maskRB = mask.fRowBytes - width;
- unsigned deviceRB = fDevice.rowBytes() - (width << 2);
- const uint8_t* alpha = mask.getAddr(clip.fLeft, clip.fTop);
- do {
- unsigned w = width;
- do {
- unsigned aa = *alpha++;
- *device = (aa << SK_A32_SHIFT) + SkAlphaMulQ(*device, SkAlpha255To256(255 - aa));
- device += 1;
- } while (--w != 0);
- device = (uint32_t*)((char*)device + deviceRB);
- alpha += maskRB;
- } while (--height != 0);
+ fBlitMaskProc(fDevice.getAddr32(clip.fLeft, clip.fTop),
+ fDevice.rowBytes(),
+ SkBitmap::kARGB_8888_Config,
+ mask.getAddr(clip.fLeft, clip.fTop), mask.fRowBytes,
+ 0xFF000000, clip.width(), clip.height());
}
}