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
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp
index 046ffc4..9b1f259 100644
--- a/libs/hwui/Properties.cpp
+++ b/libs/hwui/Properties.cpp
@@ -67,6 +67,7 @@
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 @@
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);
}