| 93 | } |
| 94 | |
| 95 | void Controller::prepareBuffer() { |
| 96 | if (!to_update_.check()) { |
| 97 | return; |
| 98 | } |
| 99 | if (to_update_ui_.check()) { |
| 100 | prepareUIStatus(); |
| 101 | } |
| 102 | prepareStatus(); |
| 103 | if (to_update_dynamic_.check()) { |
| 104 | prepareDynamics(); |
| 105 | } |
| 106 | if (to_update_lrms_.check()) { |
| 107 | prepareLRMS(); |
| 108 | to_update_correction_indices_ = true; |
| 109 | if (c_sgc_on_) { |
| 110 | updateSGC(); |
| 111 | } |
| 112 | } |
| 113 | prepareFilters(); |
| 114 | if (c_correction_enabled_) { |
| 115 | if (to_update_correction_indices_) { |
| 116 | prepareCorrectionIndices(); |
| 117 | } |
| 118 | prepareCorrection(); |
| 119 | } |
| 120 | prepareDynamicParameters(); |
| 121 | if (to_update_output_.check()) { |
| 122 | prepareOutput(); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | void Controller::prepareUIStatus() { |
| 127 | c_editor_on_ = editor_on_.load(std::memory_order::relaxed); |