aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-22 13:19:43 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-22 13:19:43 +0000
commit1eeaf0ba2381f84ffd889f56303cbe0d1886bb21 (patch)
tree99852310e8d9f0a3f7a9c94f3ff0afb0375b48e4 /gpu
parent3c898186c9082c535e589807752a0a9dc5d28aa0 (diff)
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
Diffstat (limited to 'gpu')
-rw-r--r--gpu/include/GrTypes.h8
-rw-r--r--gpu/src/GrAtlas.cpp2
2 files changed, 7 insertions, 3 deletions
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");
}