* This drains the PFE_SOUND measurement data queue into _pf_data. * PFE_SOUND measurements are made by the mixer thread and so cannot be stored * into _pf_data directly, because this would not be thread safe and would violate * the invariants of the FPS and frame graph windows. * @see PerformanceMeasurement::~PerformanceMeasurement() */
| 1065 | * @see PerformanceMeasurement::~PerformanceMeasurement() |
| 1066 | */ |
| 1067 | void ProcessPendingPerformanceMeasurements() |
| 1068 | { |
| 1069 | if (_sound_perf_pending.load(std::memory_order_acquire)) { |
| 1070 | std::lock_guard lk(_sound_perf_lock); |
| 1071 | for (size_t i = 0; i < _sound_perf_measurements.size(); i += 2) { |
| 1072 | _pf_data[PFE_SOUND].Add(_sound_perf_measurements[i], _sound_perf_measurements[i + 1]); |
| 1073 | } |
| 1074 | _sound_perf_measurements.clear(); |
| 1075 | _sound_perf_pending.store(false, std::memory_order_relaxed); |
| 1076 | } |
| 1077 | } |
no test coverage detected