tempdata 也采用三缓冲架构

This commit is contained in:
2026-07-23 11:39:46 +08:00
parent a3a385f8da
commit e2ecf8081f
22 changed files with 395 additions and 251 deletions
+4 -4
View File
@@ -11,12 +11,12 @@ namespace YSG {
if(!ok()) return -1;
TimeAxisPrivate* pd = d();
SpinLockGuard _guard(&pd->mBufferLock);
RenderEditGuard _editGuard(pd);
RenderInputGuard _inputGuard(pd);
std::pair<int, bool> ret = pd->mTimeTicker.getNewDataTickInfo();
auto td = reinterpret_cast<TimeAxisTempData*>(pd->mEditTempData);
td->mAllTime.push_back(time);
auto input = reinterpret_cast<TimeAxisInputData*>(pd->inputData(Input_Edit));
input->mAllTime.push_back(time);
if(ret.second) {
td->mData.push_front({time, ret.first});
input->mData.push_front({time, ret.first});
}
return ret.first;
}