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

Unverified Commit b7747813 authored by Steve Kondik's avatar Steve Kondik Committed by Michael Bestas
Browse files

Conditionally revert "HWC2: Don't set null handle for client layers"

 * This commit causes black screenshots on HWC1. Scope it to HWC2 only.

Change-Id: Idd2d6b18af829165232a48674db4c0560a61bdf6
parent eb55ebc0
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -744,6 +744,13 @@ void Layer::setPerFrameData(const sp<const DisplayDevice>& displayDevice) {
            (mActiveBuffer != nullptr && mActiveBuffer->handle == nullptr)) {
            (mActiveBuffer != nullptr && mActiveBuffer->handle == nullptr)) {
        ALOGV("[%s] Requesting Client composition", mName.string());
        ALOGV("[%s] Requesting Client composition", mName.string());
        setCompositionType(hwcId, HWC2::Composition::Client);
        setCompositionType(hwcId, HWC2::Composition::Client);
#ifndef USE_HWC2
        error = hwcLayer->setBuffer(nullptr, Fence::NO_FENCE);
        if (error != HWC2::Error::None) {
            ALOGE("[%s] Failed to set null buffer: %s (%d)", mName.string(),
                    to_string(error).c_str(), static_cast<int32_t>(error));
        }
#endif
        return;
        return;
    }
    }