aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/RTreeBench.cpp
diff options
context:
space:
mode:
authorGravatar sglez@google.com <sglez@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-30 18:38:53 +0000
committerGravatar sglez@google.com <sglez@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-30 18:38:53 +0000
commit3e3cdadefd69691af8004d9491aa25c20b20628b (patch)
tree75d4345c48e41d8695dbf554190e825025ff56c4 /bench/RTreeBench.cpp
parentf714d513a61048d7df80ab62f7294e94fce7b5dc (diff)
Fix rtree bench
R=caryclark@google.com Review URL: https://codereview.chromium.org/23609009 git-svn-id: http://skia.googlecode.com/svn/trunk@11041 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench/RTreeBench.cpp')
-rw-r--r--bench/RTreeBench.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/bench/RTreeBench.cpp b/bench/RTreeBench.cpp
index d017f39972..624391cce9 100644
--- a/bench/RTreeBench.cpp
+++ b/bench/RTreeBench.cpp
@@ -168,16 +168,16 @@ static inline SkIRect make_XYordered_rects(SkMWCRandom& rand, int index, int num
SkIRect out;
out.fLeft = index % GRID_WIDTH;
out.fTop = index / GRID_WIDTH;
- out.fRight = 1 + rand.nextU() % (GENERATE_EXTENTS / 3);
- out.fBottom = 1 + rand.nextU() % (GENERATE_EXTENTS / 3);
+ out.fRight = fLeft + 1 + rand.nextU() % (GENERATE_EXTENTS / 3);
+ out.fBottom = fTop + 1 + rand.nextU() % (GENERATE_EXTENTS / 3);
return out;
}
static inline SkIRect make_YXordered_rects(SkMWCRandom& rand, int index, int numRects) {
SkIRect out;
out.fLeft = index / GRID_WIDTH;
out.fTop = index % GRID_WIDTH;
- out.fRight = 1 + rand.nextU() % (GENERATE_EXTENTS / 3);
- out.fBottom = 1 + rand.nextU() % (GENERATE_EXTENTS / 3);
+ out.fRight = fLeft + 1 + rand.nextU() % (GENERATE_EXTENTS / 3);
+ out.fBottom = fTop + 1 + rand.nextU() % (GENERATE_EXTENTS / 3);
return out;
}