зеркало из https://github.com/mozilla/moz-skia.git
GameBench: curCell doesn't need to be extra state.
We're using a static curCell to loop around the atlas. We can just use i. Noticed this when TSAN complained about it. Parallel invocations of the game bench were stomping on each other's curCell. BUG=skia:1792 R=robertphillips@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/270273006 git-svn-id: http://skia.googlecode.com/svn/trunk@14617 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
30602abc33
Коммит
44e3f715e6
|
@ -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] = {
|
||||
|
|
Загрузка…
Ссылка в новой задаче