diff options
author | 2012-12-20 14:05:45 -0800 | |
---|---|---|
committer | 2013-02-12 18:15:38 -0800 | |
commit | 1df8c345854155cbbcb9f80de9d12d66ea70ac08 (patch) | |
tree | 9e3eedb37edfbb45c323364366ae09ea82ba847d /services/surfaceflinger/Layer.cpp | |
parent | 351c2941736039c495dd7ac849ec64fbf7f3ff05 (diff) |
libgui: disallow NULL Fence pointers
This change eliminates the uses of a NULL sp<Fence> indicating that no waiting
is required. Instead we use a non-NULL but invalid Fence object for which the
wait methods will return immediately.
Bug: 7892871
Change-Id: I5360aebe3090422ef6920d56c99fc4eedc642e48
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 99af85736d..1401154d3c 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -298,7 +298,7 @@ void Layer::setAcquireFence(const sp<const DisplayDevice>& hw, if (layer.getCompositionType() == HWC_OVERLAY) { sp<Fence> fence = mSurfaceFlingerConsumer->getCurrentFence(); - if (fence.get()) { + if (fence->isValid()) { fenceFd = fence->dup(); if (fenceFd == -1) { ALOGW("failed to dup layer fence, skipping sync: %d", errno); |