|
Fix problems with flakes in SVG LayoutTests by reordering arithmetic.
This operation gives 4.99999952: float(25 + 200 * double(1.f*(-10.0f/100.f)))
This operation gives 5.00000000: float(25 + 200 * float(1.f*(-10.0f/100.f)))
Why 4.99999952 appear only sometimes, and only on Windows, is
not fully known. A suspect is that it's related to the 32-bit ABI which
requires use of x87 for passing floats. That combined with various
inlining decisions and context switches could possibly affect the final
value in a way that makes it seem random.
The fix in this patch is to reorder some operations. Using the example
above it will be changed to:
float(25 + (200 * 1.f * -10.f) / 100.f)
By delaying the dangerous division, every intermediate value will
be representable by a float with no errors.
This won't solve all floating point errors but it will solve the one that causes
the most common CQ flakes.
BUG= 438282
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=188871
Total comments: 4
Total comments: 8
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+174 lines, -128 lines) |
Patch |
|
M |
LayoutTests/TestExpectations
|
View
|
1
2
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/linux/svg/batik/text/smallFonts-expected.txt
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/linux/svg/custom/recursive-filter-expected.txt
|
View
|
1
2
3
4
5
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/linux/svg/filters/feColorMatrix-values-expected.txt
|
View
|
1
2
3
4
5
|
6 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/mac/svg/batik/text/textEffect-expected.txt
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/platform/mac/svg/custom/recursive-filter-expected.txt
|
View
|
1
2
3
4
5
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/mac/svg/filters/feColorMatrix-values-expected.txt
|
View
|
1
2
3
4
5
|
7 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/win/svg/batik/text/smallFonts-expected.txt
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/win/svg/batik/text/textEffect-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/platform/win/svg/custom/recursive-filter-expected.txt
|
View
|
1
2
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
LayoutTests/platform/win/svg/filters/feColorMatrix-values-expected.txt
|
View
|
1
2
|
7 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/custom/empty-merge-expected.txt
|
View
|
1
2
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/custom/feDisplacementMap-01-expected.txt
|
View
|
1
2
3
4
5
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/custom/resource-invalidate-on-target-update-expected.txt
|
View
|
1
2
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/animate-fill-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feColorMatrix-default-type-expected.txt
|
View
|
1
2
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feColorMatrix-saturate-expected.txt
|
View
|
1
2
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-change-target-id-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.txt
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-multiple-targets-id-change-expected.txt
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-position-expected.txt
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-preserveAspectratio-expected.txt
|
View
|
1
2
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-reference-invalidation-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-reference-svg-primitive-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-remove-target-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-subregions-expected.txt
|
View
|
1
2
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-subregions-preseveAspectRatio-none-expected.txt
|
View
|
1
2
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox-expected.txt
|
View
|
1
2
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-target-add-to-document-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-target-attribute-change-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-target-attribute-change-with-use-indirection-2-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-target-attribute-change-with-use-indirection-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-target-changes-id-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-target-id-change-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-target-inline-style-change-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-target-property-change-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-target-remove-from-document-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/feImage-target-style-change-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/fecomposite-region-expected.txt
|
View
|
1
2
|
1 chunk |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/filter-hidden-content-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/filter-placement-issue-expected.txt
|
View
|
1
2
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/filterRes-expected.txt
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/filteredImage-expected.txt
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/innershadow-expected.txt
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/invalidate-on-child-layout-expected.txt
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
LayoutTests/svg/filters/parent-children-with-same-filter-expected.txt
|
View
|
1
2
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/rendering/svg/SVGTextLayoutEngineBaseline.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/svg/SVGLength.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/svg/SVGLength.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+26 lines, -5 lines |
0 comments
|
Download
|
|
M |
Source/core/svg/SVGLengthContext.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/svg/SVGLengthContext.cpp
|
View
|
1
2
3
4
5
6
7
8
|
3 chunks |
+21 lines, -6 lines |
0 comments
|
Download
|
Total messages: 18 (4 generated)
|