Title: [163278] trunk/Source/WebCore
- Revision
- 163278
- Author
- [email protected]
- Date
- 2014-02-02 17:40:12 -0800 (Sun, 02 Feb 2014)
Log Message
Subpixel rendering: Use floorf/roundf/fabs in device snapping helpers.
https://bugs.webkit.org/show_bug.cgi?id=128075
Reviewed by Darin Adler.
No change in functionality.
* platform/LayoutUnit.h:
(WebCore::roundToDevicePixel):
(WebCore::floorToDevicePixel):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::platformInit):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (163277 => 163278)
--- trunk/Source/WebCore/ChangeLog 2014-02-03 01:05:01 UTC (rev 163277)
+++ trunk/Source/WebCore/ChangeLog 2014-02-03 01:40:12 UTC (rev 163278)
@@ -1,3 +1,18 @@
+2014-02-02 Zalan Bujtas <[email protected]>
+
+ Subpixel rendering: Use floorf/roundf/fabs in device snapping helpers.
+ https://bugs.webkit.org/show_bug.cgi?id=128075
+
+ Reviewed by Darin Adler.
+
+ No change in functionality.
+
+ * platform/LayoutUnit.h:
+ (WebCore::roundToDevicePixel):
+ (WebCore::floorToDevicePixel):
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::GraphicsContext::platformInit):
+
2014-02-02 Andreas Kling <[email protected]>
SVGDocumentExtensions::resourcesCache() should return a reference.
Modified: trunk/Source/WebCore/platform/LayoutUnit.h (163277 => 163278)
--- trunk/Source/WebCore/platform/LayoutUnit.h 2014-02-03 01:05:01 UTC (rev 163277)
+++ trunk/Source/WebCore/platform/LayoutUnit.h 2014-02-03 01:40:12 UTC (rev 163278)
@@ -937,12 +937,12 @@
inline float roundToDevicePixel(LayoutUnit value, float pixelSnappingFactor)
{
- return round((value.rawValue() * pixelSnappingFactor) / kEffectiveFixedPointDenominator) / pixelSnappingFactor;
+ return roundf((value.rawValue() * pixelSnappingFactor) / kEffectiveFixedPointDenominator) / pixelSnappingFactor;
}
inline float floorToDevicePixel(LayoutUnit value, float pixelSnappingFactor)
{
- return floor((value.rawValue() * pixelSnappingFactor) / kEffectiveFixedPointDenominator) / pixelSnappingFactor;
+ return floorf((value.rawValue() * pixelSnappingFactor) / kEffectiveFixedPointDenominator) / pixelSnappingFactor;
}
inline float snapSizeToDevicePixel(LayoutUnit size, LayoutUnit location, float pixelSnappingFactor)
Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (163277 => 163278)
--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2014-02-03 01:05:01 UTC (rev 163277)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2014-02-03 01:40:12 UTC (rev 163278)
@@ -140,7 +140,7 @@
}
CGAffineTransform baseDeviceMatrix = CGContextGetUserSpaceToDeviceSpaceTransform(cgContext);
- ASSERT(abs(baseDeviceMatrix.a) == abs(baseDeviceMatrix.d));
+ ASSERT(fabs(baseDeviceMatrix.a) == fabs(baseDeviceMatrix.d));
m_pixelSnappingFactor = baseDeviceMatrix.a;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes