Changeset 247846 in webkit
- Timestamp:
- Jul 25, 2019, 5:40:26 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
page/FrameSnapshotting.cpp (modified) (2 diffs)
-
page/FrameSnapshotting.h (modified) (1 diff)
-
page/TextIndicator.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r247841 r247846 1 2019-07-25 Tim Horton <timothy_horton@apple.com> 2 3 Subpixel fringes around TextIndicator snapshots at non-integral scale factors 4 https://bugs.webkit.org/show_bug.cgi?id=200145 5 6 Reviewed by Simon Fraser. 7 8 * page/FrameSnapshotting.cpp: 9 (WebCore::snapshotFrameRectWithClip): 10 * page/FrameSnapshotting.h: 11 * page/TextIndicator.cpp: 12 (WebCore::snapshotOptionsForTextIndicatorOptions): 13 Round the scale factor up, and snappily enclose the clip rects. 14 15 TextIndicator doesn't require the use of the precise scale factor that 16 the page is painted at, but we want it to be sharp, so we overshoot! 17 1 18 2019-07-25 Brent Fulgham <bfulgham@apple.com> 2 19 -
trunk/Source/WebCore/page/FrameSnapshotting.cpp
r235560 r247846 109 109 scaleFactor *= frame.page()->pageScaleFactor(); 110 110 111 if (options & SnapshotOptionsPaintWithIntegralScaleFactor) 112 scaleFactor = ceilf(scaleFactor); 113 111 114 std::unique_ptr<ImageBuffer> buffer = ImageBuffer::create(imageRect.size(), Unaccelerated, scaleFactor); 112 115 if (!buffer) … … 117 120 Path clipPath; 118 121 for (auto& rect : clipRects) 119 clipPath.addRect( rect);122 clipPath.addRect(encloseRectToDevicePixels(rect, scaleFactor)); 120 123 buffer->context().clipPath(clipPath); 121 124 } -
trunk/Source/WebCore/page/FrameSnapshotting.h
r222113 r247846 48 48 SnapshotOptionsForceBlackText = 1 << 3, 49 49 SnapshotOptionsPaintSelectionAndBackgroundsOnly = 1 << 4, 50 SnapshotOptionsPaintEverythingExcludingSelection = 1 << 5 50 SnapshotOptionsPaintEverythingExcludingSelection = 1 << 5, 51 SnapshotOptionsPaintWithIntegralScaleFactor = 1 << 6, 51 52 }; 52 53 typedef unsigned SnapshotOptions; -
trunk/Source/WebCore/page/TextIndicator.cpp
r247730 r247846 133 133 static SnapshotOptions snapshotOptionsForTextIndicatorOptions(TextIndicatorOptions options) 134 134 { 135 SnapshotOptions snapshotOptions = SnapshotOptions None;135 SnapshotOptions snapshotOptions = SnapshotOptionsPaintWithIntegralScaleFactor; 136 136 137 137 if (!(options & TextIndicatorOptionPaintAllContent)) {
Note:
See TracChangeset
for help on using the changeset viewer.