diff options
author | Jamie Gennis <jgennis@google.com> | 2013-02-13 23:22:04 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-02-13 23:22:04 +0000 |
commit | b997f6ef0f3fa7cf67fd7487b88e5d6ac0bb15e9 (patch) | |
tree | 640c13270504ecc91c21bdc62a0b8397a4a5426f /services | |
parent | c8a1e10fd2465509685d382c79d7c059db8491ac (diff) | |
parent | c52e16cbf9798b95188c82465dfd84b914ff5199 (diff) | |
download | frameworks_native-b997f6ef0f3fa7cf67fd7487b88e5d6ac0bb15e9.zip frameworks_native-b997f6ef0f3fa7cf67fd7487b88e5d6ac0bb15e9.tar.gz frameworks_native-b997f6ef0f3fa7cf67fd7487b88e5d6ac0bb15e9.tar.bz2 |
Merge changes I50831d4e,I5360aebe
* changes:
flatland: remove an unneeded #include
libgui: disallow NULL Fence pointers
Diffstat (limited to 'services')
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWComposer.cpp | 8 | ||||
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 2 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlingerConsumer.cpp | 1 |
3 files changed, 5 insertions, 6 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp index ead158e..7a24d4c 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp @@ -539,7 +539,7 @@ status_t HWComposer::setFramebufferTarget(int32_t id, } int acquireFenceFd = -1; - if (acquireFence != NULL) { + if (acquireFence->isValid()) { acquireFenceFd = acquireFence->dup(); } @@ -659,7 +659,7 @@ status_t HWComposer::commit() { for (size_t i=0 ; i<mNumDisplays ; i++) { DisplayData& disp(mDisplayData[i]); disp.lastDisplayFence = disp.lastRetireFence; - disp.lastRetireFence = NULL; + disp.lastRetireFence = Fence::NO_FENCE; if (disp.list) { if (disp.list->retireFenceFd != -1) { disp.lastRetireFence = new Fence(disp.list->retireFenceFd); @@ -725,9 +725,7 @@ int HWComposer::fbPost(int32_t id, if (mHwc && hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_1)) { return setFramebufferTarget(id, acquireFence, buffer); } else { - if (acquireFence != NULL) { - acquireFence->waitForever(1000, "HWComposer::fbPost"); - } + acquireFence->waitForever(1000, "HWComposer::fbPost"); return mFbDev->post(mFbDev, buffer->handle); } } diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 99af857..1401154 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); diff --git a/services/surfaceflinger/SurfaceFlingerConsumer.cpp b/services/surfaceflinger/SurfaceFlingerConsumer.cpp index dc9089e..e427072 100644 --- a/services/surfaceflinger/SurfaceFlingerConsumer.cpp +++ b/services/surfaceflinger/SurfaceFlingerConsumer.cpp @@ -15,6 +15,7 @@ */ #define ATRACE_TAG ATRACE_TAG_GRAPHICS +//#define LOG_NDEBUG 0 #include "SurfaceFlingerConsumer.h" |