summaryrefslogtreecommitdiff
path: root/libs/hwui/Properties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/Properties.cpp')
-rw-r--r--libs/hwui/Properties.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp
index 2196b0fde90f..1253beb2d2b2 100644
--- a/libs/hwui/Properties.cpp
+++ b/libs/hwui/Properties.cpp
@@ -17,11 +17,14 @@
#include "Properties.h"
#include "Debug.h"
#include "DeviceInfo.h"
+#ifdef __ANDROID__
#include "HWUIProperties.sysprop.h"
+#endif
#include "SkTraceEventCommon.h"
#include <algorithm>
#include <cstdlib>
+#include <optional>
#include <android-base/properties.h>
#include <cutils/compiler.h>
@@ -30,6 +33,16 @@
namespace android {
namespace uirenderer {
+#ifndef __ANDROID__ // Layoutlib does not compile HWUIProperties.sysprop as it depends on cutils properties
+std::optional<bool> use_vulkan() {
+ return base::GetBoolProperty("ro.hwui.use_vulkan", false);
+}
+
+std::optional<std::int32_t> render_ahead() {
+ return base::GetIntProperty("ro.hwui.render_ahead", 0);
+}
+#endif
+
bool Properties::debugLayersUpdates = false;
bool Properties::debugOverdraw = false;
bool Properties::showDirtyRegions = false;