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] = {