aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBlitter_ARGB32.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-27 16:44:46 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-27 16:44:46 +0000
commiteffc5016f040945a53ab0ea47f9ea02404c17805 (patch)
tree137b3257bfcd83ec0d7b954507c11ecb30ad215b /src/core/SkBlitter_ARGB32.cpp
parent67908f2faee17a8bce4d074980617cc0d15fabf1 (diff)
remove obsolete text codepaths
git-svn-id: http://skia.googlecode.com/svn/trunk@1725 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkBlitter_ARGB32.cpp')
-rw-r--r--src/core/SkBlitter_ARGB32.cpp86
1 files changed, 2 insertions, 84 deletions
diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp
index 1901937080..f54bd5a274 100644
--- a/src/core/SkBlitter_ARGB32.cpp
+++ b/src/core/SkBlitter_ARGB32.cpp
@@ -21,23 +21,6 @@
#include "SkUtils.h"
#include "SkXfermode.h"
-#if defined(SK_SUPPORT_LCDTEXT)
-namespace skia_blitter_support {
-// subpixel helper functions from SkBlitter_ARGB32_Subpixel.cpp
-uint32_t* adjustForSubpixelClip(const SkMask& mask,
- const SkIRect& clip, const SkBitmap& device,
- int* widthAdjustment, int* heightAdjustment,
- const uint32_t** alpha32);
-extern uint32_t BlendLCDPixelWithColor(const uint32_t alphaPixel, const uint32_t originalPixel,
- const uint32_t sourcePixel);
-extern uint32_t BlendLCDPixelWithOpaqueColor(const uint32_t alphaPixel, const uint32_t originalPixel,
- const uint32_t sourcePixel);
-extern uint32_t BlendLCDPixelWithBlack(const uint32_t alphaPixel, const uint32_t originalPixel);
-}
-
-using namespace skia_blitter_support;
-#endif
-
///////////////////////////////////////////////////////////////////////////////
static inline int upscale31To32(int value) {
@@ -354,38 +337,6 @@ void SkARGB32_Opaque_Blitter::blitMask(const SkMask& mask,
int width = clip.width();
int height = clip.height();
-#if defined(SK_SUPPORT_LCDTEXT)
- const bool lcdMode = mask.fFormat == SkMask::kHorizontalLCD_Format;
- const bool verticalLCDMode = mask.fFormat == SkMask::kVerticalLCD_Format;
-
- // In LCD mode the masks have either an extra couple of rows or columns on the edges.
- if (lcdMode || verticalLCDMode) {
- int widthAdjustment, heightAdjustment;
- const uint32_t* alpha32;
- uint32_t* device = adjustForSubpixelClip(mask, clip, fDevice, &widthAdjustment, &heightAdjustment, &alpha32);
-
- width += widthAdjustment;
- height += heightAdjustment;
-
- unsigned devRB = fDevice.rowBytes() - (width << 2);
- unsigned alphaExtraRowWords = mask.rowWordsLCD() - width;
- SkPMColor srcColor = fPMColor;
-
- do {
- unsigned w = width;
- do {
- const uint32_t alphaPixel = *alpha32++;
- const uint32_t originalPixel = *device;
- *device++ = BlendLCDPixelWithOpaqueColor(alphaPixel, originalPixel, srcColor);
- } while (--w != 0);
- device = (uint32_t*)((char*)device + devRB);
- alpha32 += alphaExtraRowWords;
- } while (--height != 0);
-
- return;
- }
-#endif
-
fBlitMaskProc(fDevice.getAddr32(x, y), fDevice.rowBytes(),
SkBitmap::kARGB_8888_Config,
mask.getAddr(x, y), mask.fRowBytes, fColor, width, height);
@@ -458,45 +409,12 @@ 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 {
-#if defined(SK_SUPPORT_LCDTEXT)
- const bool lcdMode = mask.fFormat == SkMask::kHorizontalLCD_Format;
- const bool verticalLCDMode = mask.fFormat == SkMask::kVerticalLCD_Format;
-#endif
-
- // In LCD mode the masks have either an extra couple of rows or columns on the edges.
- unsigned width = clip.width();
- unsigned height = clip.height();
+ unsigned width = clip.width();
+ unsigned height = clip.height();
SkASSERT((int)height > 0);
SkASSERT((int)width > 0);
-#if defined(SK_SUPPORT_LCDTEXT)
- if (lcdMode || verticalLCDMode) {
- int widthAdjustment, heightAdjustment;
- const uint32_t* alpha32;
- uint32_t* device = adjustForSubpixelClip(mask, clip, fDevice, &widthAdjustment, &heightAdjustment, &alpha32);
-
- width += widthAdjustment;
- height += heightAdjustment;
-
- unsigned deviceRB = fDevice.rowBytes() - (width << 2);
- unsigned alphaExtraRowWords = mask.rowWordsLCD() - width;
-
- do {
- unsigned w = width;
- do {
- const uint32_t alphaPixel = *alpha32++;
- const uint32_t originalPixel = *device;
- *device++ = BlendLCDPixelWithBlack(alphaPixel, originalPixel);
- } while (--w != 0);
- device = (uint32_t*)((char*)device + deviceRB);
- alpha32 += alphaExtraRowWords;
- } while (--height != 0);
-
- return;
- }
-#endif
-
uint32_t* device = fDevice.getAddr32(clip.fLeft, clip.fTop);
unsigned maskRB = mask.fRowBytes - width;
unsigned deviceRB = fDevice.rowBytes() - (width << 2);