summaryrefslogtreecommitdiff
path: root/drmdisplaycomposition.cpp
diff options
context:
space:
mode:
authorZach Reizner <zachr@google.com>2015-11-13 16:11:37 -0800
committerZach Reizner <zachr@google.com>2015-11-13 16:11:37 -0800
commitcb1cfc866b47c480a9fa84f6edcc5239ac99d277 (patch)
treed6e02a310e7bfdb5cb40d3ac2bc2e2a1bd707b40 /drmdisplaycomposition.cpp
parent49446bc72b33b8b68352b2048657bea4a8da4a42 (diff)
downloaddrm_hwcomposer-cb1cfc866b47c480a9fa84f6edcc5239ac99d277.tar.gz
drm_hwcomposer-cb1cfc866b47c480a9fa84f6edcc5239ac99d277.tar.xz
drm_hwcomposer: avoid creating release fences for invalid OutputFd
This change also adds a check for OutputFd to see if it is valid. Change-Id: If992d523c707cc5e6e660de721938a26f27477d8
Diffstat (limited to 'drmdisplaycomposition.cpp')
-rw-r--r--drmdisplaycomposition.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/drmdisplaycomposition.cpp b/drmdisplaycomposition.cpp
index 9e591ea..b266bd7 100644
--- a/drmdisplaycomposition.cpp
+++ b/drmdisplaycomposition.cpp
@@ -248,6 +248,8 @@ int DrmDisplayComposition::CreateAndAssignReleaseFences() {
}
for (DrmHwcLayer *layer : squash_layers) {
+ if (!layer->release_fence)
+ continue;
int ret = layer->release_fence.Set(CreateNextTimelineFence());
if (ret < 0)
return ret;
@@ -255,6 +257,8 @@ int DrmDisplayComposition::CreateAndAssignReleaseFences() {
timeline_squash_done_ = timeline_;
for (DrmHwcLayer *layer : pre_comp_layers) {
+ if (!layer->release_fence)
+ continue;
int ret = layer->release_fence.Set(CreateNextTimelineFence());
if (ret < 0)
return ret;
@@ -262,6 +266,8 @@ int DrmDisplayComposition::CreateAndAssignReleaseFences() {
timeline_pre_comp_done_ = timeline_;
for (DrmHwcLayer *layer : comp_layers) {
+ if (!layer->release_fence)
+ continue;
int ret = layer->release_fence.Set(CreateNextTimelineFence());
if (ret < 0)
return ret;