tempdata 也采用三缓冲架构
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user