summaryrefslogtreecommitdiff
path: root/libs/hwui/Properties.h
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2022-09-23 17:49:23 -0400
committer John Reck <jreck@google.com> 2022-09-28 10:47:56 -0400
commit5f66fb8162935f342752ed069d8e967819b7f28b (patch)
treeda3817f59e65259d187f5db2cd039ae0aa03dd8c /libs/hwui/Properties.h
parentd112853729e4047a73ee0fc6b96f3a1e90be33d2 (diff)
Change how memory policy is configured
Should be a mostly no-op but adds a handful of new options * Adds a 'MemoryPolicy' to mostly consolidate memory settings * Moves trim handling into HWUI proper * Adds settings for UI hidden & context destruction that's not dependent on TRIM signals * Treats persistent process the same as system_server * Tweaks HardwareBitmapUploader timeout to reduce churn Bug: 245565051 Test: builds & boots Change-Id: I1f1b3db884ef7fa45ff2556436464a99440b998e
Diffstat (limited to 'libs/hwui/Properties.h')
-rw-r--r--libs/hwui/Properties.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h
index 2f8c67903a8b..96a517629eaa 100644
--- a/libs/hwui/Properties.h
+++ b/libs/hwui/Properties.h
@@ -193,6 +193,8 @@ enum DebugLevel {
*/
#define PROPERTY_DRAWING_ENABLED "debug.hwui.drawing_enabled"
+#define PROPERTY_MEMORY_POLICY "debug.hwui.app_memory_policy"
+
///////////////////////////////////////////////////////////////////////////////
// Misc
///////////////////////////////////////////////////////////////////////////////
@@ -292,16 +294,27 @@ public:
static bool enableWebViewOverlays;
+ static bool isHighEndGfx;
+ static bool isLowRam;
+ static bool isSystemOrPersistent;
+
static StretchEffectBehavior getStretchEffectBehavior() {
return stretchEffectBehavior;
}
static void setIsHighEndGfx(bool isHighEndGfx) {
+ Properties::isHighEndGfx = isHighEndGfx;
stretchEffectBehavior = isHighEndGfx ?
StretchEffectBehavior::ShaderHWUI :
StretchEffectBehavior::UniformScale;
}
+ static void setIsLowRam(bool isLowRam) { Properties::isLowRam = isLowRam; }
+
+ static void setIsSystemOrPersistent(bool isSystemOrPersistent) {
+ Properties::isSystemOrPersistent = isSystemOrPersistent;
+ }
+
/**
* Used for testing. Typical configuration of stretch behavior is done
* through setIsHighEndGfx