Wait on frame work fences when frames are dropped

bug:30895941

Prevents a race where frame work could interleave between frames,
causing SurfaceView position updates to be delivered out of order.

Change-Id: I01e4cc557b69dcf33e877a0e16c0d115ec95e4cc
This commit is contained in:
Chris Craik
2016-08-31 17:32:46 -07:00
parent c6c45d225c
commit 06e2e9cf4c
3 changed files with 8 additions and 2 deletions

View File

@ -104,6 +104,9 @@ void DrawFrameTask::run() {
if (CC_LIKELY(canDrawThisFrame)) {
context->draw();
} else {
// wait on fences so tasks don't overlap next frame
context->waitOnFences();
}
if (!canUnblockUiThread) {