mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-23 07:02:25 +00:00
!11335 切帧时计算的nextVsyncTime时间戳不能提前
Merge pull request !11335 from shegangbin/fix_vsync_0522
This commit is contained in:
commit
eb4e94facb
@ -361,9 +361,7 @@ int64_t VSyncGenerator::ComputeListenerNextVSyncTimeStamp(const Listener& listen
|
||||
now -= phase;
|
||||
if (now < 0) {
|
||||
if (vsyncMode_ == VSYNC_MODE_LTPO) {
|
||||
if (expectTimeFlag_) { // Ensure that nextTime is not earlier than referenceTime.
|
||||
auto num = ((-now) / periodRecord_) * periodRecord_;
|
||||
ScopedBytrace trace("sgb num:" + std::to_string(num) + ", now:" + std::to_string(now));
|
||||
if (expectTimeFlag_ || refreshRateIsChanged_) { // Ensure that nextTime is not earlier than referenceTime.
|
||||
now += ((-now) / periodRecord_) * periodRecord_;
|
||||
}
|
||||
now -= periodRecord_;
|
||||
|
Loading…
Reference in New Issue
Block a user