mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-27 01:00:50 +00:00
Merge branch 'master' of https://gitee.com/jacknoe/graphic_graphic_2d
This commit is contained in:
commit
653a3a69cb
@ -161,13 +161,13 @@ inline void SyncFenceTracker::UpdateFrameQueue(int32_t startTime)
|
||||
frameStartTimes->push(startTime);
|
||||
}
|
||||
|
||||
int32_t SyncFenceTracker::GetFrameRate()
|
||||
inline int32_t SyncFenceTracker::GetFrameRate()
|
||||
{
|
||||
int32_t frameRate = 0;
|
||||
auto frameNum = frameStartTimes->size();
|
||||
if (frameNum > 1) {
|
||||
auto interval = frameStartTimes->back() - frameStartTimes->front();
|
||||
if(interval > 0) {
|
||||
if (interval > 0) {
|
||||
frameRate = FRAME_PERIOD * (frameNum - 1) / interval;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user