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

Commit bb73a41f authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8142553 from fe423e31 to tm-d1-release

Change-Id: Ic8ce3269e4667e5d4b37061a99ade54f9436788d
parents 5dc8fb88 fe423e31
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -593,6 +593,10 @@ status_t EGLConsumer::doGLFenceWaitLocked(SurfaceTexture& st) const {
}

void EGLConsumer::onFreeBufferLocked(int slotIndex) {
    if (mEglSlots[slotIndex].mEglImage != nullptr &&
        mEglSlots[slotIndex].mEglImage == mCurrentTextureImage) {
        mCurrentTextureImage.clear();
    }
    mEglSlots[slotIndex].mEglImage.clear();
}

+1 −1
Original line number Diff line number Diff line
@@ -306,7 +306,7 @@ void BufferLayer::preparePerFrameCompositionState() {
                : aidl::android::hardware::graphics::composer3::Composition::DEVICE;
    }

    compositionState->buffer = mBufferInfo.mBuffer->getBuffer();
    compositionState->buffer = getBuffer();
    compositionState->bufferSlot = (mBufferInfo.mBufferSlot == BufferQueue::INVALID_BUFFER_SLOT)
            ? 0
            : mBufferInfo.mBufferSlot;
+7 −3
Original line number Diff line number Diff line
@@ -59,9 +59,13 @@ void Display::setConfiguration(const compositionengine::DisplayCreationArgs& arg
    setName(args.name);
    bool isBootModeSupported = getCompositionEngine().getHwComposer().getBootDisplayModeSupport();
    const auto physicalId = PhysicalDisplayId::tryCast(mId);
    if (physicalId && isBootModeSupported) {
        mPreferredBootDisplayModeId = static_cast<int32_t>(
                getCompositionEngine().getHwComposer().getPreferredBootDisplayMode(*physicalId));
    if (!physicalId || !isBootModeSupported) {
        return;
    }
    std::optional<hal::HWConfigId> preferredBootModeId =
            getCompositionEngine().getHwComposer().getPreferredBootDisplayMode(*physicalId);
    if (preferredBootModeId.has_value()) {
        mPreferredBootDisplayModeId = static_cast<int32_t>(preferredBootModeId.value());
    }
}

+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ public:
                          hal::VsyncPeriodChangeTimeline*));
    MOCK_METHOD2(setBootDisplayMode, status_t(PhysicalDisplayId, hal::HWConfigId));
    MOCK_METHOD1(clearBootDisplayMode, status_t(PhysicalDisplayId));
    MOCK_METHOD1(getPreferredBootDisplayMode, hal::HWConfigId(PhysicalDisplayId));
    MOCK_METHOD1(getPreferredBootDisplayMode, std::optional<hal::HWConfigId>(PhysicalDisplayId));
    MOCK_METHOD0(getBootDisplayModeSupport, bool());
    MOCK_METHOD2(setAutoLowLatencyMode, status_t(PhysicalDisplayId, bool));
    MOCK_METHOD2(getSupportedContentTypes,
+7 −9
Original line number Diff line number Diff line
@@ -772,18 +772,16 @@ status_t HWComposer::clearBootDisplayMode(PhysicalDisplayId displayId) {
    return NO_ERROR;
}

hal::HWConfigId HWComposer::getPreferredBootDisplayMode(PhysicalDisplayId displayId) {
    RETURN_IF_INVALID_DISPLAY(displayId, BAD_INDEX);
    hal::HWConfigId displayModeId = -1;
std::optional<hal::HWConfigId> HWComposer::getPreferredBootDisplayMode(
        PhysicalDisplayId displayId) {
    RETURN_IF_INVALID_DISPLAY(displayId, std::nullopt);
    hal::HWConfigId displayModeId;
    const auto error =
            mDisplayData[displayId].hwcDisplay->getPreferredBootDisplayConfig(&displayModeId);
    if (error == hal::Error::UNSUPPORTED) {
        RETURN_IF_HWC_ERROR(error, displayId, INVALID_OPERATION);
    }
    if (error == hal::Error::BAD_PARAMETER) {
        RETURN_IF_HWC_ERROR(error, displayId, BAD_VALUE);
    if (error != hal::Error::NONE) {
        LOG_DISPLAY_ERROR(displayId, to_string(error).c_str());
        return std::nullopt;
    }
    RETURN_IF_HWC_ERROR(error, displayId, UNKNOWN_ERROR);
    return displayModeId;
}

Loading