From f516e3a36e069e99477c027eda448c3d6121a028 Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 3 Feb 2021 16:30:51 -0500 Subject: Fix render_ahead properties 0 and -1 both meant default when 0 should mean 0 and -1 should mean default Test: manual Fixes: 179290765 Change-Id: Ia9aa5e3d83757282bfff776e083d6b3d7d29e9c0 --- libs/hwui/Properties.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libs/hwui/Properties.cpp') diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp index 65f4e8c8ecec..e798f2a2bc69 100644 --- a/libs/hwui/Properties.cpp +++ b/libs/hwui/Properties.cpp @@ -129,8 +129,9 @@ bool Properties::load() { runningInEmulator = base::GetBoolProperty(PROPERTY_QEMU_KERNEL, false); - defaultRenderAhead = std::max(-1, std::min(2, base::GetIntProperty(PROPERTY_RENDERAHEAD, - render_ahead().value_or(0)))); + defaultRenderAhead = std::max( + -1, + std::min(2, base::GetIntProperty(PROPERTY_RENDERAHEAD, render_ahead().value_or(-1)))); return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw); } -- cgit v1.2.3-59-g8ed1b