From 1263448196dec4a5b601dabeb56b5fb24c1d72fa Mon Sep 17 00:00:00 2001 From: benjaminwagner Date: Thu, 31 Mar 2016 06:13:22 -0700 Subject: 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 --- bench/GrMemoryPoolBench.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bench/GrMemoryPoolBench.cpp') 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]; -- cgit v1.2.3