diff options
author | Chris Craik <ccraik@google.com> | 2016-08-31 17:32:46 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2016-08-31 17:32:47 -0700 |
commit | 06e2e9cf4c3fe1eaac3271c9a346d5cc7fe5c3a8 (patch) | |
tree | d6eb5230e13665a9bba1fc7b0b5c48f01292c5c5 /libs/hwui/renderthread/DrawFrameTask.cpp | |
parent | c6c45d225cba9ecc4521de61c3af49cc038d685a (diff) |
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
Diffstat (limited to 'libs/hwui/renderthread/DrawFrameTask.cpp')
-rw-r--r-- | libs/hwui/renderthread/DrawFrameTask.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp index c9c07b3df292..e3b6dc6fd9fe 100644 --- a/libs/hwui/renderthread/DrawFrameTask.cpp +++ b/libs/hwui/renderthread/DrawFrameTask.cpp @@ -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) { |