12014-02-01 Zalan Bujtas <zalan@apple.com>
2
3 Subpixel rendering: Introduce device pixel snapping helper functions.
4 https://bugs.webkit.org/show_bug.cgi?id=128049
5
6 Reviewed by NOBODY (OOPS!).
7
8 These functions help device pixel snapping during painting. They follow the logic of
9 the corresponding pixelSnappedInt* functions.
10
11 No change in functionality.
12
13 * platform/LayoutUnit.h:
14 (WebCore::roundToDevicePixel):
15 (WebCore::floorToDevicePixel):
16 (WebCore::snapSizeToPixel):
17 (WebCore::snapSizeToDevicePixel):
18 * platform/graphics/GraphicsContext.cpp:
19 (WebCore::GraphicsContext::GraphicsContext):
20 * platform/graphics/GraphicsContext.h:
21 (WebCore::GraphicsContext::paintPixelRatio):
22 * platform/graphics/LayoutRect.h:
23 (WebCore::pixelSnappedForPainting):
24 * platform/graphics/cg/GraphicsContextCG.cpp:
25 (WebCore::GraphicsContext::platformInit): ASSERT against uniform scaling. Apparently
26 scaleX = 1, scaleY = -1 is a valid scaling context for ImageBuffer.
27