|
|
Change random number generator for tests to SkMWCRandom.
Subject pretty much says it all. This also removes some unused headers and fixes a couple of bugs exposed by changing the random number generator.
First, the function SkMatrix::getMaxStretch() had an error where it was testing the square of a number against near-zero. This led to it occasionally taking a cheaper but imprecise path for computing the eigenvalues of the matrix. I replaced this with a check against the square of SK_ScalarNearlyZero. This does become a constant in assembly, at least on Windows.
The second case was a failure in ClipStackTest, where it hit the rare case of a practically empty clip stack (it has a single Union) and we set a tight bounds. The bounds rect doesn't get set by GrReducedClip::ReduceClipStack() in this case, so when it clips the reduced stack it's clipping against garbage, and the resulting regions don't match. The solution is to initialize the tightBounds rect.
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+56 lines, -57 lines) |
Patch |
 |
M |
src/core/SkFloat.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
src/core/SkGraphics.cpp
|
View
|
1
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
src/core/SkMatrix.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
src/gpu/GrRedBlackTree.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
src/gpu/gl/GrGLEffectMatrix.h
|
View
|
1
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
tests/AAClipTest.cpp
|
View
|
1
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
tests/BlurTest.cpp
|
View
|
1
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
tests/ClampRangeTest.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
tests/ClipStackTest.cpp
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tests/ColorFilterTest.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
tests/ColorTest.cpp
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tests/DrawBitmapRectTest.cpp
|
View
|
1
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
tests/GrMemoryPoolTest.cpp
|
View
|
1
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
tests/InfRectTest.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
tests/LListTest.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
tests/MathTest.cpp
|
View
|
1
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
tests/MatrixTest.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
tests/PackBitsTest.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
tests/PathTest.cpp
|
View
|
1
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
tests/PictureTest.cpp
|
View
|
1
|
5 chunks |
+7 lines, -5 lines |
0 comments
|
Download
|
 |
M |
tests/RTreeTest.cpp
|
View
|
1
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
tests/RegionTest.cpp
|
View
|
1
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
tests/Sk64Test.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
tests/SortTest.cpp
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tests/StreamTest.cpp
|
View
|
1
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
tests/UtilsTest.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
tests/Writer32Test.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 5 (0 generated)
|