Changeset 117528 in webkit
- Timestamp:
- May 17, 2012 7:14:17 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r117524 r117528 1 2012-05-17 Levi Weintraub <leviw@chromium.org> 2 3 Floor y coordinate in Chromium's GraphicsContext::drawLineForText to avoid anti-aliasing 4 https://bugs.webkit.org/show_bug.cgi?id=86775 5 6 Reviewed by Eric Seidel. 7 8 Despite operating in floats, we always want to draw lines for text aligned to pixel boundaries. 9 There are similar functions to do this in other platforms, but to get proper results, we only 10 need to floor the y value, as we always draw these lines horizontally. 11 12 No tests. No change in behavior prior to sub-pixel change. 13 14 * platform/graphics/skia/GraphicsContextSkia.cpp: 15 (WebCore::GraphicsContext::drawLineForText): 16 1 17 2012-05-17 Michael Moss <mmoss@chromium.org> 2 18 -
trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
r113059 r117528 630 630 SkRect r; 631 631 r.fLeft = WebCoreFloatToSkScalar(pt.x()); 632 r.fTop = WebCoreFloatToSkScalar(pt.y()); 632 // Avoid anti-aliasing lines. Currently, these are always horizontal. 633 r.fTop = WebCoreFloatToSkScalar(floorf(pt.y())); 633 634 r.fRight = r.fLeft + WebCoreFloatToSkScalar(width); 634 635 r.fBottom = r.fTop + SkIntToScalar(thickness);
Note: See TracChangeset
for help on using the changeset viewer.