summaryrefslogtreecommitdiff
path: root/libs/hwui/Properties.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2019-03-13 16:25:20 -0700
committerJohn Reck <jreck@google.com>2019-04-04 18:03:35 +0000
commit4d527226fd2dbca30798b25e6c5cf50288ffd322 (patch)
tree565315067642d9b739fafb0a83457c0566447681 /libs/hwui/Properties.cpp
parentdd07ae579c291a2b6ffe09bd576fd908eb9e5ddd (diff)
Add back render-ahead support
Currently only supported in the EGL path. Vulkan support Coming Soon Bug: 127822449 Test: trace of hwuimacro Change-Id: Iac2b039e11d964aab5b8ca1bdf2a5430b187e2ea
Diffstat (limited to 'libs/hwui/Properties.cpp')
-rw-r--r--libs/hwui/Properties.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp
index 046ffc4da5ea..9b1f25986d56 100644
--- a/libs/hwui/Properties.cpp
+++ b/libs/hwui/Properties.cpp
@@ -67,6 +67,7 @@ bool Properties::debuggingEnabled = false;
bool Properties::isolatedProcess = false;
int Properties::contextPriority = 0;
+int Properties::defaultRenderAhead = 0;
static int property_get_int(const char* key, int defaultValue) {
char buf[PROPERTY_VALUE_MAX] = {
@@ -129,6 +130,13 @@ bool Properties::load() {
enableForceDarkSupport = property_get_bool(PROPERTY_ENABLE_FORCE_DARK, true);
+ defaultRenderAhead = std::max(0, std::min(2, property_get_int(PROPERTY_RENDERAHEAD,
+ render_ahead().value_or(0))));
+
+ if (defaultRenderAhead && sRenderPipelineType == RenderPipelineType::SkiaVulkan) {
+ ALOGW("hwui.render_ahead of %d ignored because pipeline is skiavk", defaultRenderAhead);
+ }
+
return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw);
}