summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2016-03-10 15:18:42 -0500
committerRobert Foss <robert.foss@collabora.com>2017-02-28 13:53:06 -0500
commitd4a0a3d2aee4bbfe38395f4c2e11128461d13317 (patch)
tree02868a30564dbd3af69f51692220c82d72643054
parent406dbfc4c7c9ae5a5d669c6cec00394fcc9bfa87 (diff)
downloaddrm_hwcomposer-d4a0a3d2aee4bbfe38395f4c2e11128461d13317.tar.gz
drm_hwcomposer-d4a0a3d2aee4bbfe38395f4c2e11128461d13317.tar.xz
drm_hwcomposer: Break out of sync_wait loop on success
Don't call sync_wait kAcquireWaitTries times if it returns successfully. Change-Id: Iebdc2229966bfce4aaf35a07ef59aef405e301c6 Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Robert Foss <robert.foss@collabora.com>
-rw-r--r--drmdisplaycompositor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp
index 92323b6..3675af4 100644
--- a/drmdisplaycompositor.cpp
+++ b/drmdisplaycompositor.cpp
@@ -229,7 +229,6 @@ void DrmDisplayCompositor::FrameWorker::Routine() {
ALOGE("Failed to wait for signal, %d", wait_ret);
return;
}
-
compositor_->ApplyFrame(std::move(frame.composition), frame.status);
}
@@ -675,6 +674,8 @@ int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp,
if (ret)
ALOGW("Acquire fence %d wait %d failed (%d). Total time %d",
acquire_fence, i, ret, total_fence_timeout);
+ else
+ break;
}
if (ret) {
ALOGE("Failed to wait for acquire %d/%d", acquire_fence, ret);