diff options
author | benjaminwagner <benjaminwagner@google.com> | 2016-03-31 06:13:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-31 06:13:22 -0700 |
commit | 1263448196dec4a5b601dabeb56b5fb24c1d72fa (patch) | |
tree | 7ec519c1f0cf54a1f18a939fc399c21914a4ccba /bench/GrMemoryPoolBench.cpp | |
parent | cce19c821ce0a76886078c6df24fba57fd2f12de (diff) |
Make SkRandom::next[US]Fixed1 private; update documentation for SkRandom::nextSScalar1.
SkRandom is unused in Chromium, Android, Mozilla, and Google3.
SkRandom::nextSScalar1 and LCGRandom::nextSScalar1 appear to me by inspection to potentially return -1, so I updated the documentation to match.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1846773002
Review URL: https://codereview.chromium.org/1846773002
Diffstat (limited to 'bench/GrMemoryPoolBench.cpp')
-rw-r--r-- | bench/GrMemoryPoolBench.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bench/GrMemoryPoolBench.cpp b/bench/GrMemoryPoolBench.cpp index f1872fc136..9b60c3cc2c 100644 --- a/bench/GrMemoryPoolBench.cpp +++ b/bench/GrMemoryPoolBench.cpp @@ -50,9 +50,9 @@ protected: }; A* objects[kMaxObjects]; - // We delete if a random [-1, 1] fixed pt is < the thresh. Otherwise, + // We delete if a random number [-1, 1] is < the thresh. Otherwise, // we allocate. We start allocate-biased and ping-pong to delete-biased - SkFixed delThresh = -SK_FixedHalf; + SkScalar delThresh = -SK_ScalarHalf; const int kSwitchThreshPeriod = loops / (2 * kMaxObjects); int s = 0; @@ -62,7 +62,7 @@ protected: delThresh = -delThresh; s = 0; } - SkFixed del = r.nextSFixed1(); + SkScalar del = r.nextSScalar1(); if (count && (kMaxObjects == count || del < delThresh)) { delete objects[count-1]; |