From f802abe47f5bafd617ab64c2330a3d1827a4f95c Mon Sep 17 00:00:00 2001 From: Kevin DuBois Date: Thu, 25 Apr 2019 12:52:24 -0700 Subject: [PATCH] hwui: ro.hwui.render_ahead=0 queue on high FPS ro.hwui.render_ahead was behaving the same as -1 when it was set to zero. Correct it so that ro.hwui.render_ahead will queue frames when set to zero on any display rate FPS. Fixes: 131340980 Test: Test presence or not of timestamps with -1,0,1,2 settings Change-Id: Ibd1974253e947130fb03a0b86f599e0e5f5eac38 --- libs/hwui/renderthread/CanvasContext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index f326ce8d23e91..8551234afa359 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -153,7 +153,8 @@ void CanvasContext::setSurface(sp&& surface) { mNativeSurface = nullptr; } - if (mRenderAheadDepth == 0 && DeviceInfo::get()->getMaxRefreshRate() > 66.6f) { + if (mRenderAheadDepth == 0 && DeviceInfo::get()->getMaxRefreshRate() > 66.6f && + !mFixedRenderAhead) { mFixedRenderAhead = false; mRenderAheadCapacity = 1; } else {