aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkScalerContext.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-11-22 14:20:55 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-11-22 14:20:55 +0000
commit1f6b4ae0f723317d01b158ce1498dabf4d93a67b (patch)
tree1f35887dac6e449ab2c7ee0226c967f27f858ef0 /src/core/SkScalerContext.cpp
parent897e66cb0b80dd0294a2ac897b0df568adb49307 (diff)
remove GetGammaFlag from SkFontHost
prep for retooling of gamma support git-svn-id: http://skia.googlecode.com/svn/trunk@2730 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkScalerContext.cpp')
-rw-r--r--src/core/SkScalerContext.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index 27481f8a1f..8727bb7a17 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -21,9 +21,6 @@
#define ComputeBWRowBytes(width) (((unsigned)(width) + 7) >> 3)
-static const uint8_t* gBlackGammaTable;
-static const uint8_t* gWhiteGammaTable;
-
void SkGlyph::toMask(SkMask* mask) const {
SkASSERT(mask);
@@ -77,15 +74,6 @@ static SkFlattenable* load_flattenable(const SkDescriptor* desc, uint32_t tag) {
SkScalerContext::SkScalerContext(const SkDescriptor* desc)
: fPathEffect(NULL), fMaskFilter(NULL)
{
- static bool gHaveGammaTables;
- if (!gHaveGammaTables) {
- const uint8_t* tables[2];
- SkFontHost::GetGammaTables(tables);
- gBlackGammaTable = tables[0];
- gWhiteGammaTable = tables[1];
- gHaveGammaTables = true;
- }
-
fBaseGlyphCount = 0;
fNextContext = NULL;
@@ -563,28 +551,6 @@ void SkScalerContext::getImage(const SkGlyph& origGlyph) {
SkMask::FreeImage(dstM.fImage);
}
}
-
- // check to see if we should filter the alpha channel
-
- if (NULL == fMaskFilter &&
- fRec.fMaskFormat != SkMask::kBW_Format &&
- fRec.fMaskFormat != SkMask::kLCD16_Format &&
- fRec.fMaskFormat != SkMask::kLCD32_Format &&
- (fRec.fFlags & (kGammaForBlack_Flag | kGammaForWhite_Flag)) != 0)
- {
- const uint8_t* table = (fRec.fFlags & kGammaForBlack_Flag) ? gBlackGammaTable : gWhiteGammaTable;
- if (NULL != table) {
- uint8_t* dst = (uint8_t*)origGlyph.fImage;
- unsigned rowBytes = origGlyph.rowBytes();
-
- for (int y = origGlyph.fHeight - 1; y >= 0; --y) {
- for (int x = origGlyph.fWidth - 1; x >= 0; --x) {
- dst[x] = table[dst[x]];
- }
- dst += rowBytes;
- }
- }
- }
}
void SkScalerContext::getPath(const SkGlyph& glyph, SkPath* path) {