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

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

Snap for 12368321 from ec115475 to 24Q4-release

Change-Id: Ib742f68cab59ea83ac749209ee8736840f31b975
parents 7b755b1b ec115475
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -389,6 +389,7 @@ enum class InputDeviceConfigurationFileType : int32_t {
    CONFIGURATION = 0,     /* .idc file */
    KEY_LAYOUT = 1,        /* .kl file */
    KEY_CHARACTER_MAP = 2, /* .kcm file */
    ftl_last = KEY_CHARACTER_MAP,
};

/*
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ status_t FdTrigger::triggerablePoll(const android::RpcTransportFd& transportFd,

    // POLLNVAL: invalid FD number, e.g. not opened.
    if (pfd[0].revents & POLLNVAL) {
        ALOGE("Invalid FD number (%d) in FdTrigger (POLLNVAL)", pfd[0].fd);
        LOG_ALWAYS_FATAL("Invalid FD number (%d) in FdTrigger (POLLNVAL)", pfd[0].fd);
        return BAD_VALUE;
    }

+15 −0
Original line number Diff line number Diff line
@@ -40,6 +40,13 @@ status_t ScreenCaptureResults::writeToParcel(android::Parcel* parcel) const {
    SAFE_PARCEL(parcel->writeBool, capturedSecureLayers);
    SAFE_PARCEL(parcel->writeBool, capturedHdrLayers);
    SAFE_PARCEL(parcel->writeUint32, static_cast<uint32_t>(capturedDataspace));
    if (optionalGainMap != nullptr) {
        SAFE_PARCEL(parcel->writeBool, true);
        SAFE_PARCEL(parcel->write, *optionalGainMap);
    } else {
        SAFE_PARCEL(parcel->writeBool, false);
    }
    SAFE_PARCEL(parcel->writeFloat, hdrSdrRatio);
    return NO_ERROR;
}

@@ -68,6 +75,14 @@ status_t ScreenCaptureResults::readFromParcel(const android::Parcel* parcel) {
    uint32_t dataspace = 0;
    SAFE_PARCEL(parcel->readUint32, &dataspace);
    capturedDataspace = static_cast<ui::Dataspace>(dataspace);

    bool hasGainmap;
    SAFE_PARCEL(parcel->readBool, &hasGainmap);
    if (hasGainmap) {
        optionalGainMap = new GraphicBuffer();
        SAFE_PARCEL(parcel->read, *optionalGainMap);
    }
    SAFE_PARCEL(parcel->readFloat, &hdrSdrRatio);
    return NO_ERROR;
}

+5 −0
Original line number Diff line number Diff line
@@ -69,5 +69,10 @@ parcelable CaptureArgs {
    // exact colorspace is not an appropriate intermediate result.
    // Note that if the caller is requesting a specific dataspace, this hint does nothing.
    boolean hintForSeamlessTransition = false;

    // Allows the screenshot to attach a gainmap, which allows for a per-pixel
    // transformation of the screenshot to another luminance range, typically
    // mapping an SDR base image into HDR.
    boolean attachGainmap = false;
}
+5 −0
Original line number Diff line number Diff line
@@ -36,6 +36,11 @@ public:
    bool capturedSecureLayers{false};
    bool capturedHdrLayers{false};
    ui::Dataspace capturedDataspace{ui::Dataspace::V0_SRGB};
    // A gainmap that can be used to "lift" the screenshot into HDR
    sp<GraphicBuffer> optionalGainMap;
    // HDR/SDR ratio value that fully applies the gainmap.
    // Note that we use 1/64 epsilon offsets to eliminate precision issues
    float hdrSdrRatio{1.0f};
};

} // namespace android::gui
Loading