diff options
author | Kevin DuBois <kevindubois@google.com> | 2019-04-25 12:52:24 -0700 |
---|---|---|
committer | Kevin DuBois <kevindubois@google.com> | 2019-04-25 16:05:01 -0700 |
commit | f802abe47f5bafd617ab64c2330a3d1827a4f95c (patch) | |
tree | 41b9ed61da3233ecc87168d74bb2fa6a55d07df2 /libs/hwui/renderthread/CanvasContext.cpp | |
parent | 25b06f04d4d79b9fc8f9a74d54b27bdccabd88bb (diff) |
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
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index f326ce8d23e9..8551234afa35 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -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 { |