Fix the frame sync issue in COMBINED_UPDATE_RENDER mode 61/134461/3
authorRichard Huang <r.huang@samsung.com>
Thu, 15 Jun 2017 16:16:11 +0000 (17:16 +0100)
committerRichard Huang <r.huang@samsung.com>
Tue, 27 Jun 2017 10:22:59 +0000 (11:22 +0100)
commit601fd01762da626c38747feea033736226f36f69
tree69559916a79ccc2ba6b6bc6357e16e88672c2c83
parent13a89dfbeb961e9f3b5e9701290b1c0eac0e86ff
Fix the frame sync issue in COMBINED_UPDATE_RENDER mode

There could be a small gap between the start time of the current frame and the
sleep-until time calculated in the previous frame. In addition, the update or
rendering in the current frame could take too much time so that the calculated
sleep-until time has already passed. In order to make the frames keep syncing
to the default frame duration (i.e. 16 ms) in these cases, we should keep tracking
any extra time taken by the current frame and shorten the duration of the next frame
accordingly.

Change-Id: Ic3dcbfbc5b8aded6514310ee17843839daf12f03
adaptors/base/combined-update-render/combined-update-render-controller.cpp
adaptors/base/combined-update-render/combined-update-render-controller.h