aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-13 20:01:51 +0000
committerGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-13 20:01:51 +0000
commit1bd2d67702a5c14011f02e23b3724965f82c4780 (patch)
tree6e5bf21ee2d188f05ed268af0ea0ea869379372d /src
parentfdb9b212a8590204e99d49d08b8b9bf19f0b2f67 (diff)
Correctly linearize Windows AA from ClearType.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/ports/SkFontHost_win.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
index 814053c17e..7ea3d49681 100755
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -1135,9 +1135,13 @@ void SkScalerContext_Windows::generateImage(const SkGlyph& glyph, SkMaskGamma::P
}
if (!isBW) {
- const uint8_t* table = getInverseGammaTableClearType();
- if (isAA) {
- table = getInverseGammaTableGDI();
+ const uint8_t* table;
+ //The offscreen contains a GDI blit if isAA and kGenA8FromLCD_Flag is not set.
+ //Otherwise the offscreen contains a ClearType blit.
+ if (isAA && !(fRec.fFlags & SkScalerContext::kGenA8FromLCD_Flag)) {
+ table = getInverseGammaTableGDI();
+ } else {
+ table = getInverseGammaTableClearType();
}
//Note that the following cannot really be integrated into the
//pre-blend, since we may not be applying the pre-blend; when we aren't