Bug 1618868 Part 2: Make counts and states in CanvasEventRingBuffer footers SequentiallyConsistent. r=jrmuizel

This fixes an issue with the AboutToWait check. It is possible that this could
be done without this, but while there might be a very slight performance hit, it
seems to be smaller than the general noise in the tests.

Depends on D70335

Differential Revision: https://phabricator.services.mozilla.com/D70336

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Bob Owen 2020-04-14 17:52:57 +00:00
Родитель 7bd8cb606c
Коммит 00d118c48c
1 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -182,16 +182,16 @@ class CanvasEventRingBuffer final : public gfx::EventRingBuffer {
};
struct ReadFooter {
Atomic<uint32_t, ReleaseAcquire> count;
Atomic<uint32_t, ReleaseAcquire> returnCount;
Atomic<State, ReleaseAcquire> state;
Atomic<uint32_t> count;
Atomic<uint32_t> returnCount;
Atomic<State> state;
};
struct WriteFooter {
Atomic<uint32_t, ReleaseAcquire> count;
Atomic<uint32_t, ReleaseAcquire> returnCount;
Atomic<uint32_t, ReleaseAcquire> requiredDifference;
Atomic<State, ReleaseAcquire> state;
Atomic<uint32_t> count;
Atomic<uint32_t> returnCount;
Atomic<uint32_t> requiredDifference;
Atomic<State> state;
};
CanvasEventRingBuffer(const CanvasEventRingBuffer&) = delete;