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

Commit f10620fb authored by Dan Stoza's avatar Dan Stoza Committed by android-build-merger
Browse files

HWC2: Use SolidColor composition for DimLayer am: 0a21df78

am: 257b6578

Change-Id: Ie353a1dc8a644f8e9e5003a8f1b8f6943cd41a9e
parents f277ba69 257b6578
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -703,16 +703,25 @@ void Layer::setPerFrameData(const sp<const DisplayDevice>& displayDevice) {
        return;
    }

    // Client or SolidColor layers
    if (mActiveBuffer == nullptr || mActiveBuffer->handle == nullptr ||
            mHwcLayers[hwcId].forceClientComposition) {
        // TODO: This also includes solid color layers, but no API exists to
        // setup a solid color layer yet
    // Client layers
    if (mHwcLayers[hwcId].forceClientComposition ||
            (mActiveBuffer != nullptr && mActiveBuffer->handle == nullptr)) {
        ALOGV("[%s] Requesting Client composition", mName.string());
        setCompositionType(hwcId, HWC2::Composition::Client);
        return;
    }

    // SolidColor layers
    if (mActiveBuffer == nullptr) {
        setCompositionType(hwcId, HWC2::Composition::SolidColor);
        error = hwcLayer->setColor({0, 0, 0, 255});
        if (error != HWC2::Error::None) {
            ALOGE("[%s] Failed to set color: %s (%d)", mName.string(),
                    to_string(error).c_str(), static_cast<int32_t>(error));
        }
        return;
    }

    // Device or Cursor layers
    if (mPotentialCursor) {
        ALOGV("[%s] Requesting Cursor composition", mName.string());