Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c6d1fd0 authored by Jamie Gennis's avatar Jamie Gennis Committed by Android Git Automerger
Browse files

am 789a6c3f: SurfaceFlinger: fix a couple NULL fence checks

* commit '789a6c3f':
  SurfaceFlinger: fix a couple NULL fence checks
parents 49990564 789a6c3f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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