diff options
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() { |