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
diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp
index 778e768..5b0e281 100644
--- a/libs/hwui/renderthread/DrawFrameTask.cpp
+++ b/libs/hwui/renderthread/DrawFrameTask.cpp
@@ -103,9 +103,8 @@
// 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)) {