diff options
author | 2022-09-23 17:49:23 -0400 | |
---|---|---|
committer | 2022-09-28 10:47:56 -0400 | |
commit | 5f66fb8162935f342752ed069d8e967819b7f28b (patch) | |
tree | da3817f59e65259d187f5db2cd039ae0aa03dd8c /libs/hwui/HardwareBitmapUploader.cpp | |
parent | d112853729e4047a73ee0fc6b96f3a1e90be33d2 (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/HardwareBitmapUploader.cpp')
-rw-r--r-- | libs/hwui/HardwareBitmapUploader.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/hwui/HardwareBitmapUploader.cpp b/libs/hwui/HardwareBitmapUploader.cpp index 7291cab364e2..b7e99994355c 100644 --- a/libs/hwui/HardwareBitmapUploader.cpp +++ b/libs/hwui/HardwareBitmapUploader.cpp @@ -42,6 +42,8 @@ namespace android::uirenderer { +static constexpr auto kThreadTimeout = 60000_ms; + class AHBUploader; // This helper uploader classes allows us to upload using either EGL or Vulkan using the same // interface. @@ -80,7 +82,7 @@ public: } void postIdleTimeoutCheck() { - mUploadThread->queue().postDelayed(5000_ms, [this](){ this->idleTimeoutCheck(); }); + mUploadThread->queue().postDelayed(kThreadTimeout, [this]() { this->idleTimeoutCheck(); }); } protected: @@ -97,7 +99,7 @@ private: bool shouldTimeOutLocked() { nsecs_t durationSince = systemTime() - mLastUpload; - return durationSince > 2000_ms; + return durationSince > kThreadTimeout; } void idleTimeoutCheck() { |