summaryrefslogtreecommitdiff
path: root/libs/hwui/Properties.cpp
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2021-02-03 16:30:51 -0500
committer Ady Abraham <adyabr@google.com> 2021-02-03 15:30:05 -0800
commitf516e3a36e069e99477c027eda448c3d6121a028 (patch)
tree646fddc04fdd9a14d5d9c158e31c8b3383a75419 /libs/hwui/Properties.cpp
parent621abeb8a9eb40516dc52494889da38714ca73fe (diff)
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
Diffstat (limited to 'libs/hwui/Properties.cpp')
-rw-r--r--libs/hwui/Properties.cpp5
1 files changed, 3 insertions, 2 deletions
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);
}