From 1eeaf0ba2381f84ffd889f56303cbe0d1886bb21 Mon Sep 17 00:00:00 2001 From: "caryclark@google.com" Date: Wed, 22 Jun 2011 13:19:43 +0000 Subject: Add support for 8 bits/component glyphs, to better match the fonts produced by CoreText on OS/X. M include/config/SkUserConfig.h M include/core/SkMask.h M include/core/SkScalerContext.h M src/core/SkBlitter_ARGB32.cpp M src/core/SkScalerContext.cpp M src/core/SkPaint.cpp M src/gpu/SkGrFontScaler.cpp M src/ports/SkFontHost_mac_coretext.cpp M src/ports/SkFontHost_mac.cpp M gpu/include/GrTypes.h M gpu/src/GrAtlas.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@1672 2bbb7eff-a529-9590-31e7-b0007b416f81 --- gpu/include/GrTypes.h | 8 +++++--- gpu/src/GrAtlas.cpp | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'gpu') diff --git a/gpu/include/GrTypes.h b/gpu/include/GrTypes.h index 76e01b00a7..2bf4b09055 100644 --- a/gpu/include/GrTypes.h +++ b/gpu/include/GrTypes.h @@ -247,10 +247,12 @@ enum GrBlendCoeff { * Important that these are 0-based. */ enum GrMaskFormat { - kA8_GrMaskFormat, //!< 1-byte per pixel - kA565_GrMaskFormat //!< 2-bytes per pixel + kA8_GrMaskFormat, //!< 1-byte per pixel + kA565_GrMaskFormat, //!< 2-bytes per pixel + kA888_GrMaskFormat, //!< 4-bytes per pixel + + kCount_GrMaskFormats //!< used to allocate arrays sized for mask formats }; -#define kCount_GrMaskFormats 2 /** * Return the number of bytes-per-pixel for the specified mask format. diff --git a/gpu/src/GrAtlas.cpp b/gpu/src/GrAtlas.cpp index e577beb629..480a3073f9 100644 --- a/gpu/src/GrAtlas.cpp +++ b/gpu/src/GrAtlas.cpp @@ -148,6 +148,8 @@ static GrPixelConfig maskformat2pixelconfig(GrMaskFormat format) { return kAlpha_8_GrPixelConfig; case kA565_GrMaskFormat: return kRGB_565_GrPixelConfig; + case kA888_GrMaskFormat: + return kRGBA_8888_GrPixelConfig; default: GrAssert(!"unknown maskformat"); } -- cgit v1.2.3