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

Unified Diff: bench/GameBench.cpp

Issue 270273006: GameBench: curCell doesn't need to be extra state. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/GameBench.cpp
diff --git a/bench/GameBench.cpp b/bench/GameBench.cpp
index 839440b612e0dd4ffaa6719be75f866c651caddf..c0a0e1b1b3e21fdab41c8188766442b8adc9b1f3 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] = {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698