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
This commit is contained in:
Kevin DuBois
2019-04-25 12:52:24 -07:00
parent 25b06f04d4
commit f802abe47f

View File

@@ -153,7 +153,8 @@ void CanvasContext::setSurface(sp<Surface>&& 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 {