diff options
author | John Reck <jreck@google.com> | 2018-04-05 16:41:41 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2018-04-09 10:58:15 -0700 |
commit | ec100976e0655acaa204c8800dfb83dadae20cc8 (patch) | |
tree | d7bd2d10c7be8ea0ccec63e85c8365efb87edfe4 /libs/hwui/renderthread/DrawFrameTask.cpp | |
parent | 413293ff626301e1ee9837f247c4d7321c59f472 (diff) |
Add support for render-ahead
For periods of time during which latency is less important
allow a client to request a deeper render-ahead pipeline.
The latency tradeoff results in less overall visual jank
Test: none, only used by macrobench
Change-Id: I516203b70bdc75b6415fa08bf9c4fb1b598b0102
Diffstat (limited to 'libs/hwui/renderthread/DrawFrameTask.cpp')
-rw-r--r-- | libs/hwui/renderthread/DrawFrameTask.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp index 778e7689d0f9..5b0e28125502 100644 --- a/libs/hwui/renderthread/DrawFrameTask.cpp +++ b/libs/hwui/renderthread/DrawFrameTask.cpp @@ -103,9 +103,8 @@ void DrawFrameTask::run() { // Even if we aren't drawing this vsync pulse the next frame number will still be accurate if (CC_UNLIKELY(callback)) { - context->enqueueFrameWork([callback, frameNr = context->getFrameNumber()]() { - callback(frameNr); - }); + context->enqueueFrameWork( + [ callback, frameNr = context->getFrameNumber() ]() { callback(frameNr); }); } if (CC_LIKELY(canDrawThisFrame)) { |