aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/GameBench.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bench/GameBench.cpp')
-rw-r--r--bench/GameBench.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/bench/GameBench.cpp b/bench/GameBench.cpp
index 839440b612..c0a0e1b1b3 100644
--- a/bench/GameBench.cpp
+++ b/bench/GameBench.cpp
@@ -190,9 +190,8 @@ protected:
canvas->concat(mat);
if (fUseAtlas) {
- static int curCell = 0;
+ const int curCell = i % (kNumAtlasedX * kNumAtlasedY);
SkIRect src = fAtlasRects[curCell % (kNumAtlasedX)][curCell / (kNumAtlasedX)];
- curCell = (curCell + 1) % (kNumAtlasedX*kNumAtlasedY);
if (fUseDrawVertices) {
SkPoint uvs[4] = {