Index: bench/RTreeBench.cpp |
diff --git a/bench/RTreeBench.cpp b/bench/RTreeBench.cpp |
index d017f39972f8ed6d87c2360251c4391775bacb22..624391cce97e5be450278ffda4a798ccebe61b10 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; |
} |