diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkBlitter_ARGB32.cpp | 15 | ||||
-rw-r--r-- | src/core/SkPaint.cpp | 2 | ||||
-rw-r--r-- | src/core/SkScalerContext.cpp | 2 | ||||
-rw-r--r-- | src/core/core_files.mk | 2 |
4 files changed, 11 insertions, 10 deletions
diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp index e2614c29d8..247e25517c 100644 --- a/src/core/SkBlitter_ARGB32.cpp +++ b/src/core/SkBlitter_ARGB32.cpp @@ -21,7 +21,7 @@ #include "SkUtils.h" #include "SkXfermode.h" -#if defined(SK_BUILD_SUBPIXEL) +#if defined(SK_SUPPORT_LCDTEXT) namespace skia_blitter_support { // subpixel helper functions from SkBlitter_ARGB32_Subpixel.cpp extern uint32_t BlendLCDPixelWithColor(const uint32_t alphaPixel, const uint32_t originalPixel, @@ -216,7 +216,7 @@ void SkARGB32_Opaque_Blitter::blitMask(const SkMask& mask, int width = clip.width(); int height = clip.height(); -#if defined(SK_BUILD_SUBPIXEL) +#if defined(SK_SUPPORT_LCDTEXT) const bool lcdMode = mask.fFormat == SkMask::kHorizontalLCD_Format; const bool verticalLCDMode = mask.fFormat == SkMask::kVerticalLCD_Format; #else @@ -227,7 +227,7 @@ void SkARGB32_Opaque_Blitter::blitMask(const SkMask& mask, uint32_t* device = fDevice.getAddr32(x - lcdMode, y - verticalLCDMode); uint32_t srcColor = fPMColor; -#if defined(SK_BUILD_SUBPIXEL) +#if defined(SK_SUPPORT_LCDTEXT) if (lcdMode || verticalLCDMode) { const uint32_t* alpha32 = mask.getAddrLCD(clip.fLeft, clip.fTop); @@ -348,7 +348,7 @@ void SkARGB32_Black_Blitter::blitMask(const SkMask& mask, const SkIRect& clip) { SkARGB32_BlitBW(fDevice, mask, clip, black); } else { -#if defined(SK_BUILD_SUBPIXEL) +#if defined(SK_SUPPORT_LCDTEXT) const bool lcdMode = mask.fFormat == SkMask::kHorizontalLCD_Format; const bool verticalLCDMode = mask.fFormat == SkMask::kVerticalLCD_Format; #else @@ -356,16 +356,15 @@ void SkARGB32_Black_Blitter::blitMask(const SkMask& mask, const SkIRect& clip) { #endif // In LCD mode the masks have either an extra couple of rows or columns on the edges. - uint32_t* device = fDevice.getAddr32(clip.fLeft - lcdMode, clip.fTop - verticalLCDMode); + uint32_t* device = fDevice.getAddr32(clip.fLeft - lcdMode, + clip.fTop - verticalLCDMode); unsigned width = clip.width(); unsigned height = clip.height(); SkASSERT((int)height > 0); SkASSERT((int)width > 0); - SkASSERT((int)deviceRB >= 0); - SkASSERT((int)maskRB >= 0); -#if defined(SK_BUILD_SUBPIXEL) +#if defined(SK_SUPPORT_LCDTEXT) if (lcdMode || verticalLCDMode) { const uint32_t* alpha32 = mask.getAddrLCD(clip.fLeft, clip.fTop); if (lcdMode) diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp index 95448c959a..b136733779 100644 --- a/src/core/SkPaint.cpp +++ b/src/core/SkPaint.cpp @@ -1126,7 +1126,7 @@ static SkMask::Format computeMaskFormat(const SkPaint& paint) uint32_t flags = paint.getFlags(); if (flags & SkPaint::kLCDRenderText_Flag) -#if defined(SK_BUILD_SUBPIXEL) +#if defined(SK_SUPPORT_LCDTEXT) return SkFontHost::GetSubpixelOrientation() == SkFontHost::kHorizontal_LCDOrientation ? SkMask::kHorizontalLCD_Format : SkMask::kVerticalLCD_Format; #else diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index 57a3b3548d..eab015af18 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -75,7 +75,7 @@ void SkGlyph::expandA8ToLCD() const { SkASSERT(fMaskFormat == SkMask::kHorizontalLCD_Format || fMaskFormat == SkMask::kVerticalLCD_Format); -#if defined(SK_BUILD_SUBPIXEL) +#if defined(SK_SUPPORT_LCDTEXT) uint8_t* input = reinterpret_cast<uint8_t*>(fImage); uint32_t* output = reinterpret_cast<uint32_t*>(input + SkAlign4(rowBytes() * fHeight)); diff --git a/src/core/core_files.mk b/src/core/core_files.mk index 94e19d7255..736f7fdd0b 100644 --- a/src/core/core_files.mk +++ b/src/core/core_files.mk @@ -14,6 +14,7 @@ SOURCE := \ SkBlitter_A1.cpp \ SkBlitter_A8.cpp \ SkBlitter_ARGB32.cpp \ + SkBlitter_ARGB32_Subpixel.cpp \ SkBlitter_RGB16.cpp \ SkBlitter_Sprite.cpp \ SkBuffer.cpp \ @@ -36,6 +37,7 @@ SOURCE := \ SkFlattenable.cpp \ SkFloat.cpp \ SkFloatBits.cpp \ + SkFontHost.cpp \ SkGeometry.cpp \ SkGlobals.cpp \ SkGlyphCache.cpp \ |