Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Issue 12334131: Change random number generator for tests to SkMWCRandom (Closed)

Created:
7 years, 9 months ago by jvanverth1
Modified:
7 years, 9 months ago
Reviewers:
bsalomon, reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : Rebase to latest #

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

Messages

Total messages: 5 (0 generated)
jvanverth1
7 years, 9 months ago (2013-02-27 19:34:38 UTC) #1
bsalomon
On 2013/02/27 19:34:38, JimVV wrote: lgtm
7 years, 9 months ago (2013-02-27 19:48:09 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/jvanverth@google.com/12334131/1
7 years, 9 months ago (2013-02-28 19:02:44 UTC) #3
commit-bot: I haz the power
Failed to apply patch for tests/PictureTest.cpp: While running patch -p0 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 9 months ago (2013-02-28 19:02:56 UTC) #4
jvanverth1
7 years, 9 months ago (2013-03-04 13:58:30 UTC) #5
Message was sent while issue was closed.
Committed as r7952.

Powered by Google App Engine
This is Rietveld 408576698