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

Unified Diff: bench/GrMemoryPoolBench.cpp

Issue 1846773002: Make SkRandom::next[US]Fixed1 private; update documentation for SkRandom::nextSScalar1. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/utils/SkRandom.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/GrMemoryPoolBench.cpp
diff --git a/bench/GrMemoryPoolBench.cpp b/bench/GrMemoryPoolBench.cpp
index f1872fc136889b098847c1fd838a24e1b7759203..9b60c3cc2c26ec98bc7b341ef525b25ad264d613 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];
« no previous file with comments | « no previous file | include/utils/SkRandom.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698