mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-20 10:17:05 +00:00
Factor out spin lock, get a bit stricter on PointerSets.
This commit is contained in:
@@ -32,9 +32,6 @@ BufferingScanTarget::BufferingScanTarget() {
|
||||
// Ensure proper initialisation of the two atomic pointer sets.
|
||||
read_pointers_.store(write_pointers_, std::memory_order_relaxed);
|
||||
submit_pointers_.store(write_pointers_, std::memory_order_relaxed);
|
||||
|
||||
// Establish initial state for is_updating_.
|
||||
is_updating_.clear(std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
// MARK: - Producer; pixel data.
|
||||
@@ -223,6 +220,8 @@ void BufferingScanTarget::announce(
|
||||
is_first_in_frame_ = true;
|
||||
previous_frame_was_complete_ = frame_is_complete_;
|
||||
frame_is_complete_ = true;
|
||||
|
||||
// frames_[frame_pointer_]
|
||||
}
|
||||
|
||||
// Proceed from here only if a change in visibility has occurred.
|
||||
|
||||
Reference in New Issue
Block a user