Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: src/core/SkScalerContext.cpp

Issue 728673002: remove unused kLCD_MaskFormat (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove associated Gr enum Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkScalerContext.h ('k') | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScalerContext.cpp
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index 4d7f3629eb060f7763916be9ba910b902e1ff9be..8cb416e9ae4c06b90add84f9b86a561cb24b44de 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -181,7 +181,6 @@ void SkScalerContext::getMetrics(SkGlyph* glyph) {
if (glyph->fWidth > 0) {
switch (fRec.fMaskFormat) {
case SkMask::kLCD16_Format:
- case SkMask::kLCD32_Format:
glyph->fWidth += 2;
glyph->fLeft -= 1;
break;
@@ -325,31 +324,6 @@ static void pack4xHToLCD16(const SkBitmap& src, const SkMask& dst,
}
}
-template<bool APPLY_PREBLEND>
-static void pack4xHToLCD32(const SkBitmap& src, const SkMask& dst,
- const SkMaskGamma::PreBlend& maskPreBlend) {
- SkASSERT(kAlpha_8_SkColorType == src.colorType());
- SkASSERT(SkMask::kLCD32_Format == dst.fFormat);
-
- const int width = dst.fBounds.width();
- const int height = dst.fBounds.height();
- SkPMColor* dstP = (SkPMColor*)dst.fImage;
- size_t dstRB = dst.fRowBytes;
-
- for (int y = 0; y < height; ++y) {
- const uint8_t* srcP = src.getAddr8(0, y);
-
- // TODO: need to use fir filter here as well.
- for (int x = 0; x < width; ++x) {
- U8CPU r = sk_apply_lut_if<APPLY_PREBLEND>(*srcP++, maskPreBlend.fR);
- U8CPU g = sk_apply_lut_if<APPLY_PREBLEND>(*srcP++, maskPreBlend.fG);
- U8CPU b = sk_apply_lut_if<APPLY_PREBLEND>(*srcP++, maskPreBlend.fB);
- dstP[x] = SkPackARGB32(0xFF, r, g, b);
- }
- dstP = (SkPMColor*)((char*)dstP + dstRB);
- }
-}
-
static inline int convert_8_to_1(unsigned byte) {
SkASSERT(byte <= 0xFF);
return byte >> 7;
@@ -418,7 +392,6 @@ static void generateMask(const SkMask& mask, const SkPath& path,
case SkMask::kA8_Format:
break;
case SkMask::kLCD16_Format:
- case SkMask::kLCD32_Format:
// TODO: trigger off LCD orientation
dstW = 4*dstW - 8;
matrix.setTranslate(-SkIntToScalar(mask.fBounds.fLeft + 1),
@@ -470,13 +443,6 @@ static void generateMask(const SkMask& mask, const SkPath& path,
pack4xHToLCD16<false>(bm, mask, maskPreBlend);
}
break;
- case SkMask::kLCD32_Format:
- if (maskPreBlend.isApplicable()) {
- pack4xHToLCD32<true>(bm, mask, maskPreBlend);
- } else {
- pack4xHToLCD32<false>(bm, mask, maskPreBlend);
- }
- break;
default:
break;
}
« no previous file with comments | « src/core/SkScalerContext.h ('k') | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698