diff options
| author | 2013-02-25 13:37:54 -0800 | |
|---|---|---|
| committer | 2013-02-25 15:34:30 -0800 | |
| commit | 789a6c3f1dfe22a1ffea7f39b2098d7842cd1f30 (patch) | |
| tree | 8c40341fa8fad02f9d204ddaefb610ce6e1b76cc | |
| parent | f5c7cb316cc8c8e2d6ae93a659ac771420cbfa2b (diff) | |
SurfaceFlinger: fix a couple NULL fence checks
This change replaces checks for a NULL fence pointer with calls to
Fence::isValid. There should no longer be NULL fences.
Change-Id: If17c9c132fcb1801531bf7588f8ba53476c57dad
| -rw-r--r-- | services/surfaceflinger/Layer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 1401154d3c..439acb52ae 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -526,7 +526,7 @@ void Layer::onPostComposition() { mFrameTracker.setDesiredPresentTime(desiredPresentTime); sp<Fence> frameReadyFence = mSurfaceFlingerConsumer->getCurrentFence(); - if (frameReadyFence != NULL) { + if (frameReadyFence->isValid()) { mFrameTracker.setFrameReadyFence(frameReadyFence); } else { // There was no fence for this frame, so assume that it was ready @@ -536,7 +536,7 @@ void Layer::onPostComposition() { const HWComposer& hwc = mFlinger->getHwComposer(); sp<Fence> presentFence = hwc.getDisplayFence(HWC_DISPLAY_PRIMARY); - if (presentFence != NULL) { + if (presentFence->isValid()) { mFrameTracker.setActualPresentFence(presentFence); } else { // The HWC doesn't support present fences, so use the refresh |