summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/CanvasContext.cpp
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2020-01-15 16:15:41 -0800
committerXin Li <delphij@google.com>2020-01-15 16:15:41 -0800
commite13851556bcfecff6de4b3a1a99be4dcaa5853a1 (patch)
treeee8f1d8a409d0426f6230f8288a97b495c85bc93 /libs/hwui/renderthread/CanvasContext.cpp
parent51c6389d7233566324630b98d9d37e53917a7612 (diff)
parent5f8f08ef52678f86a25f3025c149be01202f4353 (diff)
DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master
Bug: 146167222 Change-Id: Ifeb003ec9b3bf824f04d31a117aea65d517241fb
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 9898a1c30856..827cced2883b 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -143,13 +143,15 @@ void CanvasContext::destroy() {
mAnimationContext->destroy();
}
-void CanvasContext::setSurface(sp<Surface>&& surface) {
+void CanvasContext::setSurface(sp<Surface>&& surface, bool enableTimeout) {
ATRACE_CALL();
if (surface) {
mNativeSurface = new ReliableSurface{std::move(surface)};
- // TODO: Fix error handling & re-shorten timeout
- mNativeSurface->setDequeueTimeout(4000_ms);
+ if (enableTimeout) {
+ // TODO: Fix error handling & re-shorten timeout
+ mNativeSurface->setDequeueTimeout(4000_ms);
+ }
} else {
mNativeSurface = nullptr;
}