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

Commit d33cbe26 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6274646 from 44ecbf8a to rvc-release

Change-Id: Iaa6f55756c0b7f2508a5cfac51360eef42d05086
parents 887648cc 44ecbf8a
Loading
Loading
Loading
Loading
+0 −21
Original line number Original line Diff line number Diff line
@@ -443,39 +443,18 @@ void layer_state_t::merge(const layer_state_t& other) {
// ------------------------------- InputWindowCommands ----------------------------------------
// ------------------------------- InputWindowCommands ----------------------------------------


void InputWindowCommands::merge(const InputWindowCommands& other) {
void InputWindowCommands::merge(const InputWindowCommands& other) {
    transferTouchFocusCommands
            .insert(transferTouchFocusCommands.end(),
                    std::make_move_iterator(other.transferTouchFocusCommands.begin()),
                    std::make_move_iterator(other.transferTouchFocusCommands.end()));

    syncInputWindows |= other.syncInputWindows;
    syncInputWindows |= other.syncInputWindows;
}
}


void InputWindowCommands::clear() {
void InputWindowCommands::clear() {
    transferTouchFocusCommands.clear();
    syncInputWindows = false;
    syncInputWindows = false;
}
}


void InputWindowCommands::write(Parcel& output) const {
void InputWindowCommands::write(Parcel& output) const {
    output.writeUint32(static_cast<uint32_t>(transferTouchFocusCommands.size()));
    for (const auto& transferTouchFocusCommand : transferTouchFocusCommands) {
        output.writeStrongBinder(transferTouchFocusCommand.fromToken);
        output.writeStrongBinder(transferTouchFocusCommand.toToken);
    }

    output.writeBool(syncInputWindows);
    output.writeBool(syncInputWindows);
}
}


void InputWindowCommands::read(const Parcel& input) {
void InputWindowCommands::read(const Parcel& input) {
    size_t count = input.readUint32();
    transferTouchFocusCommands.clear();
    for (size_t i = 0; i < count; i++) {
        TransferTouchFocusCommand transferTouchFocusCommand;
        transferTouchFocusCommand.fromToken = input.readStrongBinder();
        transferTouchFocusCommand.toToken = input.readStrongBinder();
        transferTouchFocusCommands.emplace_back(transferTouchFocusCommand);
    }

    syncInputWindows = input.readBool();
    syncInputWindows = input.readBool();
}
}


+0 −9
Original line number Original line Diff line number Diff line
@@ -1290,15 +1290,6 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setInput
    return *this;
    return *this;
}
}


SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::transferTouchFocus(
        const sp<IBinder>& fromToken, const sp<IBinder>& toToken) {
    InputWindowCommands::TransferTouchFocusCommand transferTouchFocusCommand;
    transferTouchFocusCommand.fromToken = fromToken;
    transferTouchFocusCommand.toToken = toToken;
    mInputWindowCommands.transferTouchFocusCommands.emplace_back(transferTouchFocusCommand);
    return *this;
}

SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::syncInputWindows() {
SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::syncInputWindows() {
    mInputWindowCommands.syncInputWindows = true;
    mInputWindowCommands.syncInputWindows = true;
    return *this;
    return *this;
+0 −6
Original line number Original line Diff line number Diff line
@@ -271,12 +271,6 @@ struct DisplayState {
};
};


struct InputWindowCommands {
struct InputWindowCommands {
    struct TransferTouchFocusCommand {
        sp<IBinder> fromToken;
        sp<IBinder> toToken;
    };

    std::vector<TransferTouchFocusCommand> transferTouchFocusCommands;
    bool syncInputWindows{false};
    bool syncInputWindows{false};


    void merge(const InputWindowCommands& other);
    void merge(const InputWindowCommands& other);
+0 −1
Original line number Original line Diff line number Diff line
@@ -507,7 +507,6 @@ public:


#ifndef NO_INPUT
#ifndef NO_INPUT
        Transaction& setInputWindowInfo(const sp<SurfaceControl>& sc, const InputWindowInfo& info);
        Transaction& setInputWindowInfo(const sp<SurfaceControl>& sc, const InputWindowInfo& info);
        Transaction& transferTouchFocus(const sp<IBinder>& fromToken, const sp<IBinder>& toToken);
        Transaction& syncInputWindows();
        Transaction& syncInputWindows();
#endif
#endif


+0 −4
Original line number Original line Diff line number Diff line
@@ -3745,10 +3745,6 @@ uint32_t SurfaceFlinger::setClientStateLocked(


uint32_t SurfaceFlinger::addInputWindowCommands(const InputWindowCommands& inputWindowCommands) {
uint32_t SurfaceFlinger::addInputWindowCommands(const InputWindowCommands& inputWindowCommands) {
    uint32_t flags = 0;
    uint32_t flags = 0;
    if (!inputWindowCommands.transferTouchFocusCommands.empty()) {
        flags |= eTraversalNeeded;
    }

    if (inputWindowCommands.syncInputWindows) {
    if (inputWindowCommands.syncInputWindows) {
        flags |= eTraversalNeeded;
        flags |= eTraversalNeeded;
    }
    }