Changeset 73379 in webkit
- Timestamp:
- Dec 6, 2010 11:31:12 AM (13 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r73378 r73379 1 2010-12-06 Simon Fraser <simon.fraser@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 Font antialiasing (smoothing) changes when elements are rendered into compositing layers 6 https://bugs.webkit.org/show_bug.cgi?id=23364 7 8 Text rendered by Core Graphics over a transparent background looks bad because of 9 font smoothing, so turn off smoothing when rendering text into compositing layers. 10 11 * platform/graphics/GraphicsContext.h: 12 * platform/graphics/cg/GraphicsContextCG.cpp: 13 (WebCore::GraphicsContext::setAllowsFontSmoothing): 14 * platform/graphics/mac/WebLayer.mm: 15 (drawLayerContents): 16 1 17 2010-12-06 Patrick Gansterer <paroga@webkit.org> 2 18 -
trunk/WebCore/platform/graphics/GraphicsContext.h
r73330 r73379 194 194 void applyFillPattern(); 195 195 void drawPath(const Path&); 196 197 // Allow font smoothing (LCD antialiasing). Not part of the graphics state. 198 void setAllowsFontSmoothing(bool); 196 199 #endif 197 200 -
trunk/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
r73284 r73379 1117 1117 } 1118 1118 1119 void GraphicsContext::setAllowsFontSmoothing(bool allowsFontSmoothing) 1120 { 1121 CGContextRef context = platformContext(); 1122 CGContextSetAllowsFontSmoothing(context, allowsFontSmoothing); 1123 } 1124 1119 1125 void GraphicsContext::setPlatformTextDrawingMode(TextDrawingModeFlags mode) 1120 1126 { -
trunk/WebCore/platform/graphics/mac/WebLayer.mm
r73237 r73379 63 63 GraphicsContext graphicsContext(context); 64 64 65 // Turn off font smoothing to improve the appearance of text rendered onto a transparent background. 66 graphicsContext.setAllowsFontSmoothing(false); 67 65 68 // It's important to get the clip from the context, because it may be significantly 66 69 // smaller than the layer bounds (e.g. tiled layers)
Note: See TracChangeset
for help on using the changeset viewer.