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

Commit 72240b09 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "sf: Fix issue with dequeueBuffer when multiple display present" am: fa5cda82

Change-Id: Id157dba1141b394ac2689f3532ba7f6c07215eac
parents fc822e7d fa5cda82
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -470,7 +470,7 @@ Error Display::getName(std::string* outName) const

Error Display::getRequests(HWC2::DisplayRequest* outDisplayRequests,
                           std::unordered_map<HWC2::Layer*, LayerRequest>* outLayerRequests) {
    uint32_t intDisplayRequests;
    uint32_t intDisplayRequests = 0;
    std::vector<Hwc2::Layer> layerIds;
    std::vector<uint32_t> layerRequests;
    auto intError = mComposer.getDisplayRequests(
+10 −0
Original line number Diff line number Diff line
@@ -3400,6 +3400,7 @@ bool SurfaceFlinger::doComposeSurfaces(const sp<DisplayDevice>& displayDevice,
    const Region bounds(displayState.bounds);
    const DisplayRenderArea renderArea(displayDevice);
    const bool hasClientComposition = getHwComposer().hasClientComposition(displayId);
    const bool hasFlipClientTargetRequest = getHwComposer().hasFlipClientTargetRequest(displayId);
    ATRACE_INT("hasClientComposition", hasClientComposition);

    bool applyColorMatrix = false;
@@ -3465,6 +3466,15 @@ bool SurfaceFlinger::doComposeSurfaces(const sp<DisplayDevice>& displayDevice,
        if (applyColorMatrix) {
            clientCompositionDisplay.colorTransform = displayState.colorTransformMat;
        }
    } else if (hasFlipClientTargetRequest) {
        buf = display->getRenderSurface()->dequeueBuffer(&fd);

        if (buf == nullptr) {
            ALOGW("Dequeuing buffer for display [%s] failed, bailing out of "
                  "client composition for this frame",
                  displayDevice->getDisplayName().c_str());
            return false;
        }
    }

    /*