Title: [106029] trunk/Source/WebCore
- Revision
- 106029
- Author
- [email protected]
- Date
- 2012-01-26 12:30:40 -0800 (Thu, 26 Jan 2012)
Log Message
Signal to skia to force A8 text from LCD output, but only when we have to disable LCD because we're in a layer
https://bugs.webkit.org/show_bug.cgi?id=76547
Patch by Mike Reed <[email protected]> on 2012-01-26
Reviewed by Stephen White.
Existing tests should confirm nothing is broken. Antialiased text
is disabled in layouttests, so they should be unaffected by the
difference in antialiasing quality.
* platform/graphics/skia/SkiaFontWin.cpp:
(WebCore::setupPaintForFont):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (106028 => 106029)
--- trunk/Source/WebCore/ChangeLog 2012-01-26 20:19:05 UTC (rev 106028)
+++ trunk/Source/WebCore/ChangeLog 2012-01-26 20:30:40 UTC (rev 106029)
@@ -1,3 +1,18 @@
+2012-01-26 Mike Reed <[email protected]>
+
+ Signal to skia to force A8 text from LCD output, but only when we have to disable LCD because we're in a layer
+ https://bugs.webkit.org/show_bug.cgi?id=76547
+
+ Reviewed by Stephen White.
+
+ Existing tests should confirm nothing is broken. Antialiased text
+ is disabled in layouttests, so they should be unaffected by the
+ difference in antialiasing quality.
+
+ * platform/graphics/skia/SkiaFontWin.cpp:
+ (WebCore::setupPaintForFont):
+
+
2012-01-26 Anders Carlsson <[email protected]>
Use PlatformWheelEvent::phase() to determine if a scroll gesture begins or ends
Modified: trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.cpp (106028 => 106029)
--- trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.cpp 2012-01-26 20:19:05 UTC (rev 106028)
+++ trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.cpp 2012-01-26 20:30:40 UTC (rev 106029)
@@ -205,12 +205,24 @@
textFlags &= getDefaultGDITextFlags();
// do this check after our switch on lfQuality
- if (disableTextLCD(pcs))
+ if (disableTextLCD(pcs)) {
textFlags &= ~SkPaint::kLCDRenderText_Flag;
+ // If we *just* clear our request for LCD, then GDI seems to
+ // sometimes give us AA text, and sometimes give us BW text. Since the
+ // original intent was LCD, we want to force AA (rather than BW), so we
+ // add a special bit to tell Skia to do its best to avoid the BW: by
+ // drawing LCD offscreen and downsampling that to AA.
+ textFlags |= SkPaint::kGenA8FromLCD_Flag;
+ }
+ static const uint32_t textFlagsMask = SkPaint::kAntiAlias_Flag |
+ SkPaint::kLCDRenderText_Flag |
+ SkPaint::kGenA8FromLCD_Flag;
+
// now copy in just the text flags
+ SkASSERT(!(textFlags & ~textFlagsMask));
uint32_t flags = paint->getFlags();
- flags &= ~(SkPaint::kAntiAlias_Flag | SkPaint::kLCDRenderText_Flag);
+ flags &= ~textFlagsMask;
flags |= textFlags;
paint->setFlags(flags);
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes